diff options
| author | Ian C <ianc@noddybox.co.uk> | 2026-01-28 00:06:07 +0000 |
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2026-01-28 00:06:07 +0000 |
| commit | a64a574cc8cb32d7dfa88c6ed8e81e5411e80da0 (patch) | |
| tree | 6f2ea9c49fad87980b8c5cefebe053e77ac7d2a0 | |
| parent | 85c6b0ce41e21898adeeb9a9435954426213b964 (diff) | |
| -rwxr-xr-x | extract_zips.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/extract_zips.sh b/extract_zips.sh index e903ee7..ebc8c29 100755 --- a/extract_zips.sh +++ b/extract_zips.sh @@ -10,9 +10,14 @@ IFS=' for i in $* ; do dir="$(basename $i .zip)" - mkdir "$dir" - cd "$dir" - unzip $switch "../$i" - cd .. - rm "$i" + + if [ -d "$dir" ] ; then + echo $dir already exists + else + mkdir "$dir" + cd "$dir" + unzip $switch "../$i" + cd .. + rm "$i" + fi done |
