summaryrefslogtreecommitdiff
path: root/extract_zips.sh
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2024-10-14 13:25:34 +0100
committerIan C <ianc@noddybox.co.uk>2024-10-14 13:25:34 +0100
commitd1718c3e581271de9014ab2f2b41e69c9899f4ac (patch)
tree4e7aedac05cd12149d768a005b1ca5e76e0f8060 /extract_zips.sh
parent1fc3fa1c3a68a8ee8439c2fec00cbb4c551ede0a (diff)
parent83b338f37d60e63a27abd19e744e87d86eae8dfb (diff)
Merge branch 'master' of https://deathstation9000.org.uk/git/shell-binHEADmaster
Diffstat (limited to 'extract_zips.sh')
-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