diff --git a/functions/main b/functions/main index 4d36d565..5468cf8f 100644 --- a/functions/main +++ b/functions/main @@ -183,7 +183,7 @@ generate_template_list() { echo "$file" >> "${filelist_prepared}" else # arguments (file list/pattern) provided via cmdline - for arg in $* ; do + for arg in "$@"; do if echo $file | grep -q -- "${arg}" ; then echo "$file" >> "${filelist_prepared}" fi diff --git a/sbin/ngcpcfg b/sbin/ngcpcfg index 4aac24b0..9b336987 100755 --- a/sbin/ngcpcfg +++ b/sbin/ngcpcfg @@ -114,10 +114,10 @@ case ${1:-} in status|\ values) action "$@" ;; - --debug) export DEBUG=1 ; shift ; $0 $* ;; - --no-db-sync) export NO_DB_SYNC=1 ; shift ; $0 $* ;; - --no-validate) export NO_VALIDATE=1; shift ; $0 $* ;; - --no-action-failure) export NO_ACTION_FAILURE=1; shift ; $0 $* ;; + --debug) export DEBUG=1 ; shift ; "$0" "$@" ;; + --no-db-sync) export NO_DB_SYNC=1 ; shift ; "$0" "$@" ;; + --no-validate) export NO_VALIDATE=1; shift ; "$0" "$@" ;; + --no-action-failure) export NO_ACTION_FAILURE=1; shift ; "$0" "$@" ;; -h|--help|help) usage ; exit 0;; -v|--version|version) version ; exit 0;; *) usage 1; exit 1;; diff --git a/scripts/apply b/scripts/apply index 7e667950..65e6fb34 100755 --- a/scripts/apply +++ b/scripts/apply @@ -40,7 +40,7 @@ fi "${SCRIPTS}"/build "${SCRIPTS}"/services -"${SCRIPTS}"/commit "$*" +"${SCRIPTS}"/commit "$@" # We "commit" AFTER we "build", therefore the state information is out of date # and would be marked as "dirty". As we have full control over this during the diff --git a/scripts/build b/scripts/build index cc2c299e..5ddeecbc 100755 --- a/scripts/build +++ b/scripts/build @@ -47,7 +47,7 @@ for f in ${NGCPCTL_CONFIG:-} ${HOST_CONFIG:-} ${LOCAL_CONFIG:-} ${NETWORK_CONFIG done build_config_files() { - for file in $(generate_template_list $*) ; do + for file in $(generate_template_list "$@") ; do log_debug "${HELPER}/build_config $file" "${HELPER}/build_config" "${file}" RC=$(($RC + $?)) @@ -60,7 +60,7 @@ build_config_files() { RC=0 if ! $MODIFIED_ONLY ; then - build_config_files "$*" + build_config_files "$@" else log_info "Considering modified files only due to --modified-only option." @@ -94,7 +94,7 @@ else if $trigger_rebuild ; then log_info "Main configuation file(s) has been changed, running full rebuild." log_debug "Executing: build_config_files $*" - build_config_files "$*" + build_config_files "$@" fi if git diff-index --name-only HEAD | grep -q templates/ || \ diff --git a/scripts/diff b/scripts/diff index 7a0581b0..32466d66 100755 --- a/scripts/diff +++ b/scripts/diff @@ -18,7 +18,7 @@ log_debug "cd $NGCPCTL_MAIN" cd "$NGCPCTL_MAIN" log_debug "git diff $*" -git diff $* +git diff "$@" # added files log_debug "git status --porcelain | awk '/^\?\? / {print \$2}'" diff --git a/scripts/log b/scripts/log index ff7e0158..c7cbc181 100755 --- a/scripts/log +++ b/scripts/log @@ -25,11 +25,11 @@ if [ -f "${FUNCTIONS}/ha_features" ] ; then exit 1 fi - git log $* --oneline --date-order --graph --date=rfc --format=format:"%h (%ar) %s %d" master origin/master + git log "$@" --oneline --date-order --graph --date=rfc --format=format:"%h (%ar) %s %d" master origin/master else - git log $* --oneline --date-order --graph --date=rfc --format=format:"%h (%ar) %s %d" master + git log "$@" --oneline --date-order --graph --date=rfc --format=format:"%h (%ar) %s %d" master fi