aboutsummaryrefslogtreecommitdiff
path: root/boxconf
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-07-17 08:04:16 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-07-17 08:04:16 -0400
commit419c950dc5cfeee40920d687cd60816660fd0550 (patch)
tree7c1564b20197f5f05f02a0817be4f0f5d3650856 /boxconf
parentf036b9c0da685d11e341d61e5aaeb75cac576111 (diff)
downloadinfrastructure-419c950dc5cfeee40920d687cd60816660fd0550.tar.gz
fix boxconf argument parsing
Diffstat (limited to 'boxconf')
-rwxr-xr-xboxconf4
1 files changed, 2 insertions, 2 deletions
diff --git a/boxconf b/boxconf
index c9955e7..3f7b311 100755
--- a/boxconf
+++ b/boxconf
@@ -26,8 +26,8 @@ while getopts :hde:s:X _bc_opt; do
esac
done
-[ $(( OPTIND - $# )) -eq 1 ] && usage 'HOST not specified'
-eval "BOXCONF_HOSTNAME=\$$#"
+[ $(( OPTIND - $# )) -eq 0 ] || usage
+eval "BOXCONF_HOSTNAME=\$$((OPTIND))"
for _bc_lib in "${BOXCONF_ROOT}/lib"/*; do
. "$_bc_lib"