aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-07-17 08:12:34 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-07-17 08:12:34 -0400
commitceb339370d7a0cc4a83fe54103a650dfb3f72261 (patch)
tree84f3f444e0f69d9e8a3e577071e6fcbfbdd85edd
parent419c950dc5cfeee40920d687cd60816660fd0550 (diff)
downloadinfrastructure-ceb339370d7a0cc4a83fe54103a650dfb3f72261.tar.gz
fix boxconf argument parsing
-rwxr-xr-xboxconf4
1 files changed, 2 insertions, 2 deletions
diff --git a/boxconf b/boxconf
index 3f7b311..c1fdf89 100755
--- a/boxconf
+++ b/boxconf
@@ -27,7 +27,7 @@ while getopts :hde:s:X _bc_opt; do
done
[ $(( OPTIND - $# )) -eq 0 ] || usage
-eval "BOXCONF_HOSTNAME=\$$((OPTIND))"
+eval "BOXCONF_HOSTNAME=\$$#"
for _bc_lib in "${BOXCONF_ROOT}/lib"/*; do
. "$_bc_lib"
@@ -36,5 +36,5 @@ done
if [ -n "${_bc_run:-}" ]; then
_boxconf_run
else
- _boxconf_deploy "${BOXCONF_SSH_HOST:-$1}" "$BOXCONF_HOSTNAME" "$@"
+ _boxconf_deploy "${BOXCONF_SSH_HOST:-$BOXCONF_HOSTNAME}" "$BOXCONF_HOSTNAME" "$@"
fi