Fix option handling in run_on_all_repos().
authorW Trevor King <wking@borg3.physics.drexel.edu>
Wed, 30 Nov 2011 15:30:09 +0000 (10:30 -0500)
committerW Trevor King <wking@borg3.physics.drexel.edu>
Wed, 30 Nov 2011 15:30:09 +0000 (10:30 -0500)
dotfiles.sh

index 1e7b8a61cb2f08a4c2b9cf83074510217e8d3027..e637bf018a4bda793e6c9d153ba78aa40de36abb 100755 (executable)
@@ -76,12 +76,13 @@ function get_selection()
 function run_on_all_repos()
 {
        COMMAND="${1}"
+       shift
        if [ -z "${REPO}" ]; then  # run on all repositories
                for REPO in *; do
                        if [ "${REPO}" = '*' ]; then
                                break  # no known repositories
                        fi
-                       "${COMMAND}" "${REPO}" || return 1
+                       "${COMMAND}" "${REPO}" "${@}" || return 1
                done
                return
        fi
@@ -728,7 +729,7 @@ function main()
                        shift
                done
                if [ "${#}" -eq 0 ]; then
-                       run_on_all_repos "${COMMAND}" "$OPTIONS[@]" || return 1
+                       run_on_all_repos "${COMMAND}" "${OPTIONS[@]}" || return 1
                else
                        maxargs "${0}" 1 "${@}" || return 1
                        "${COMMAND}" "${OPTIONS[@]}" "${1}" || return 1