diff options
author | EuAndreh <eu@euandre.org> | 2022-08-13 10:58:10 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-08-13 10:58:10 -0300 |
commit | a0188f38d8a9702dd3d7119375173d063a5f28bc (patch) | |
tree | 3ff6e25d0125cef5d7d7db0a7ace05a71d586166 /bin/grun | |
parent | bin/httpno: Add working utility (diff) | |
download | dotfiles-a0188f38d8a9702dd3d7119375173d063a5f28bc.tar.gz dotfiles-a0188f38d8a9702dd3d7119375173d063a5f28bc.tar.xz |
bin/: Replace usage of assert_arg with assert-arg
Diffstat (limited to 'bin/grun')
-rwxr-xr-x | bin/grun | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -71,16 +71,8 @@ while getopts 'rh' flag; do done shift $((OPTIND - 1)) -assert_arg() { - if [ -z "$1" ]; then - printf 'Missing %s\n\n' "$2" >&2 - usage >&2 - exit 2 - fi -} - FILENAME="${1:-}" -assert_arg "$FILENAME" 'FILENAME' +eval "$(assert-arg "$FILENAME" 'FILENAME')" shift if [ "${1:-}" != '--' ]; then @@ -90,7 +82,7 @@ if [ "${1:-}" != '--' ]; then fi shift -assert_arg "${1:-}" 'COMMAND' +eval "$(assert-arg "${1:-}" 'COMMAND')" if [ ! -e "$FILENAME" ]; then |