X ~ N(μ, σ²)

up

up searches upwards through the tree for a given file then runs commands there

Why

Initially so that it was easier to call build and run scripts (up build, up run), then so that I could call Makefiles (up make) and then so I could check for nested git (up -r git). Finally so that I could package a utility up and make it look pretty.

Usage

up [OPTIONS] FILE [ARGS...]
up [OPTIONS] -f FILE COMMAND [ARGS...]
up [OPTIONS] -c COMMAND FILE [ARGS...]

Options

Examples

List all parent directories

~ $ up -qrf . pwd
/home/normal-gaussian
/home
/
~ $ up -qrf .git pwd
/home/<user>/<company>/<repository/<submodule>
/home/<user>/<company>/<repository
/home/<user>

Run a build script in a parent directory

/srv/normal-gaussian.com/content/pages/up $ up build
    /srv/normal-gaussian.com/content
[  Passed  ] 00-acquire-sudo.sh
[  Passed  ] 01-clear-temp.sh
[  Passed  ] 10-copy-source.sh
[  Passed  ] 20-run-bash.sh
[  Passed  ] 30-style-sass.sh
[  Passed  ] 35-convert-charsets.sh
[  Passed  ] 40-render-pug.sh
[  Passed  ] 90-nginx-rules.sh
[  Passed  ] 99-publish.sh
[ Complete ] No Errors