From ef8d03f4ab43489ed9e71d694ec9d62173f1bbf8 Mon Sep 17 00:00:00 2001 From: RandumKiwi Date: Mon, 17 Nov 2014 09:56:36 +1300 Subject: [PATCH] Fix for conver_mapconfig.sh: Allow spaces in filenames. --- config/convert_mapconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/convert_mapconfig.sh b/config/convert_mapconfig.sh index 7f611dab..f12f0747 100644 --- a/config/convert_mapconfig.sh +++ b/config/convert_mapconfig.sh @@ -35,7 +35,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "" ]; then exit # REVERT command: elif [ "$1" = "-r" ] || [ "$1" = "--revert" ]; then - for file in $*; do + for file in "$@"; do if [ "$file" = "-r" ] || [ "$file" = "--revert" ]; then continue elif [[ -w "$file" && "$file" = *.cfg && -r "$file".BAK ]]; then @@ -51,7 +51,7 @@ fi # Alias to define if anything failed (but the script continued). CONTFAILED="0" -for file in $*; do +for file in "$@"; do if [[ -r "$file" && -w "$file" && "$file" = *.cfg ]] || [ "$file" = "-s" ] || [ "$file" = "--strip" ] || [ "$file" = "-os" ] || [ "$file" = "-sp" ] || [ "$file" = "-osp" ]; then if [ "$file" = "-s" ] || [ "$file" = "--strip" ] || [ "$file" = "-os" ] || [ "$file" = "-sp" ] || [ "$file" = "-osp" ]; then continue