mirror of
https://github.com/fsquillace/junest.git
synced 2026-01-23 02:34:30 +00:00
Issue #56: Fix arguments
This commit is contained in:
parent
3283c59e94
commit
30d8931ec5
1 changed files with 7 additions and 6 deletions
13
bin/juju
13
bin/juju
|
|
@ -122,7 +122,7 @@ function parse_arguments(){
|
|||
OPT_DELETE=false
|
||||
OPT_HELP=false
|
||||
OPT_VERSION=false
|
||||
for opt in $@
|
||||
for opt in "$@"
|
||||
do
|
||||
case "$1" in
|
||||
-i|--setup-from-file) OPT_SETUP_FROM_FILE=true ; shift ; IMAGE_FILE=$1 ; shift ;;
|
||||
|
|
@ -140,8 +140,9 @@ function parse_arguments(){
|
|||
done
|
||||
|
||||
ARGS=()
|
||||
for arg do
|
||||
ARGS+=($arg)
|
||||
for arg in "$@"
|
||||
do
|
||||
ARGS+=("$arg")
|
||||
done
|
||||
}
|
||||
|
||||
|
|
@ -169,11 +170,11 @@ function execute_operation(){
|
|||
fi
|
||||
|
||||
if $OPT_FAKEROOT; then
|
||||
run_juju_as_fakeroot "${PROOT_ARGS}" ${ARGS[@]}
|
||||
run_juju_as_fakeroot "${PROOT_ARGS}" "${ARGS[@]}"
|
||||
elif $OPT_ROOT; then
|
||||
run_juju_as_root ${ARGS[@]}
|
||||
run_juju_as_root "${ARGS[@]}"
|
||||
else
|
||||
run_juju_as_user "${PROOT_ARGS}" ${ARGS[@]}
|
||||
run_juju_as_user "${PROOT_ARGS}" "${ARGS[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue