diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-03-26 00:52:54 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-03-26 00:53:55 +0100 |
commit | a89bb489bfc0bb8d66f69e783b031b30233fdc82 (patch) | |
tree | e7ae9fd2a8a3528726b4f78515567e72abbdda8b /utils/remap.sh | |
parent | 8b36c84508e327fdb550642a76ad17e642797ddc (diff) |
Fix remap invocation
* utils/remap.sh (REMAPPED): Default to empty.
(while): Break as soon as there are no arguments any more. Do not break on
mapping parameters
Diffstat (limited to 'utils/remap.sh')
-rw-r--r-- | utils/remap.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/remap.sh b/utils/remap.sh index 106109e8..d7997591 100644 --- a/utils/remap.sh +++ b/utils/remap.sh @@ -23,7 +23,9 @@ USAGE="Usage: $0 [OPTION...] [FROM1 TO1 [FROM2 TO2 [...]] -- [COMMAND...]" DOC="Execute COMMAND in an environment where some paths are remapped." -while :; do +REMAPPED="" + +while [ "$#" -gt 0 ]; do case "$1" in --help|"-?") echo "$USAGE" @@ -47,7 +49,7 @@ while :; do exit 1;; *) MAPPED="$MAPPED $1" - break;; + shift;; esac done |