Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ in Public

📂 Create a directory if needed, then run the given command there

License

Notifications You must be signed in to change notification settings

xyproto/in

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

102 Commits

Repository files navigation

In Logo

Build License

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.

Example 1

in build cmake ..

Instead of:

mkdir -p build
cd build
cmake ..
cd ..

Or:

mkdir -p build
cmake -B build -S .

Example 2

in project ./configure --prefix=/usr

Instead of:

cd project
./configure --prefix=/usr
cd ..

Or:

(cd project; ./configure --prefix=/usr)

Or:

pushd project
./configure --prefix=/usr
popd

Example 3

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

Linux

Manual installation, using cargo, git, install and sudo:

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

FreeBSD

Manual installation, using cargo, doas, git and install:

git clone https://github.com/xyproto/in
cd in
cargo build --release
doas install -m755 target/release/in /usr/local/bin/in

General info

About

📂 Create a directory if needed, then run the given command there

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /