Skip to content

Commit

Permalink
Switch from Go to Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Aug 15, 2023
1 parent dc3dfd5 commit 8f980ed
Show file tree
Hide file tree
Showing 87 changed files with 146 additions and 19,896 deletions.
23 changes: 5 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
# Binaries for programs and plugins
*.exe
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

in
*.bak
*.swp
*~
in-*.*
*.tmp
Cargo.lock
include.txt
release/
target/
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "in"
version = "1.7.0"
authors = ["Alexander F. Rødseth <xyproto@archlinux.org>"]
edition = "2018"

# Dependencies
[dependencies]
clap = "2.33"
log = "0.4"
env_logger = "0.9"
glob = "0.3"
27 changes: 8 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

# in ![Build](https://github.com/xyproto/in/workflows/Build/badge.svg)

A utility for running a command within another directory (or directories matching a glob pattern).
Utility to execute commands in directories, and create directories if needed.

It will also create the directories, if missing. If the top level directory is empty after executing the command, it will be removed. This means that `in testdirectory pwd` leaves no traces. When running in multiple directories, it will not create any new directories.

NOTE: This project is a work in progress! Please don't use it in production just yet.
It will also create the directories, if missing. If the top level directory is empty after executing the command, it will be removed. This means that `in testdirectory pwd` leaves no traces.

## Example 1

Expand Down Expand Up @@ -46,31 +44,22 @@ Or:

## Example 3

Globbing (note the double quotes to avoid shell expansion):
Globbing (note the double quotes to avoid shell expansion). No directories are created when using globbing, but the given command will be run in each directory where a matching file is found, for each matching file.

in "./**/*pom.xml" mvn clean

## Installation

Either download the binary release (for 64-bit Linux), or install the development version (using `go install` like this requires Go 1.19 or later):

go install github.com/xyproto/in@latest

Manual installation, using `git`, `go`, `sudo` and `install`:
Manual installation, using `git`, `rust`, `sudo` and `install`:

git clone https://github.com/xyproto/in
cd in
go build
sudo install -Dm755 in /usr/bin/in

## Dependencies

* Go 1.19 or later

When compiling with GCC 10.2.0 (`gccgo`), the `in` executable is only 41k here.
cargo build --release
mkdir -p /usr/bin
sudo install -m755 target/release/in /usr/bin/in

## General info

* Version: 1.6.0
* Version: 1.7.0
* License: BSD-3
* Author: Alexander F. Rødseth &lt;xyproto@archlinux.org&gt;
103 changes: 0 additions & 103 deletions directory.go

This file was deleted.

93 changes: 0 additions & 93 deletions directory_test.go

This file was deleted.

5 changes: 0 additions & 5 deletions go.mod

This file was deleted.

11 changes: 0 additions & 11 deletions go.sum

This file was deleted.

4 changes: 2 additions & 2 deletions in.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" -*-Nroff-*-
.\"
.TH "in" 1 "14 Aug 2023" "" ""
.TH "in" 1 "15 Aug 2023" "" ""
.SH NAME
in \- execute a command in a given directory
.SH SYNOPSIS
Expand All @@ -12,7 +12,7 @@ Run the given command in the given directory, creating the directory if needed.
If the top directory is empty after running the command, remove it.
.sp
.SH VERSION
1.6.0
1.7.0
.SH BUGS
No known bugs so far. Issues can be reported at: https://github.com/xyproto/in/issues
.SH AUTHOR
Expand Down
Loading

0 comments on commit 8f980ed

Please sign in to comment.