summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2024-08-27 18:24:22 +0100
committerIan C <ianc@noddybox.co.uk>2024-08-27 18:24:22 +0100
commit83b338f37d60e63a27abd19e744e87d86eae8dfb (patch)
tree2a85e2d2e204eb521a9c92699340beef723af27c
parent1a625a73cad0fff566236c2624444fe78c6390d1 (diff)
Update to extract_zips.sh to handle spaces betterHEADmaster
-rwxr-xr-xextract_zips.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/extract_zips.sh b/extract_zips.sh
index 749b6f4..e903ee7 100755
--- a/extract_zips.sh
+++ b/extract_zips.sh
@@ -5,11 +5,14 @@ if [ "x$1" = "x-j" ] ; then
shift
fi
+IFS='
+'
+
for i in $* ; do
- dir=$(basename $i .zip)
- mkdir $dir
- cd $dir
- unzip $switch ../$i
+ dir="$(basename $i .zip)"
+ mkdir "$dir"
+ cd "$dir"
+ unzip $switch "../$i"
cd ..
- rm $i
+ rm "$i"
done