aboutsummaryrefslogtreecommitdiff
path: root/bin/rfc
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-08-13 10:58:10 -0300
committerEuAndreh <eu@euandre.org>2022-08-13 10:58:10 -0300
commita0188f38d8a9702dd3d7119375173d063a5f28bc (patch)
tree3ff6e25d0125cef5d7d7db0a7ace05a71d586166 /bin/rfc
parentbin/httpno: Add working utility (diff)
downloaddotfiles-a0188f38d8a9702dd3d7119375173d063a5f28bc.tar.gz
dotfiles-a0188f38d8a9702dd3d7119375173d063a5f28bc.tar.xz
bin/: Replace usage of assert_arg with assert-arg
Diffstat (limited to 'bin/rfc')
-rwxr-xr-xbin/rfc10
1 files changed, 1 insertions, 9 deletions
diff --git a/bin/rfc b/bin/rfc
index e0da425..bd8fb67 100755
--- a/bin/rfc
+++ b/bin/rfc
@@ -86,14 +86,6 @@ check_local_db() {
fi
}
-assert_arg() {
- if [ -z "$1" ]; then
- printf 'Missing %s.\n\n' "$2" >&2
- usage >&2
- exit 2
- fi
-}
-
for flag in "$@"; do
case "$flag" in
@@ -141,7 +133,7 @@ if [ "${UPDATE:-}" = true ]; then
exit
fi
-assert_arg "$RFC_NUMBER"
+eval "$(assert-arg "$RFC_NUMBER")"
if [ ! -e "$F" ]; then
printf 'Given RFC_NUMBER "%s" does not exist at:\n%s\n' \