summaryrefslogtreecommitdiff
path: root/scripts/unzip-all
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/unzip-all')
-rwxr-xr-xscripts/unzip-all3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/unzip-all b/scripts/unzip-all
new file mode 100755
index 0000000..0982666
--- /dev/null
+++ b/scripts/unzip-all
@@ -0,0 +1,3 @@
+#! /usr/bin/env sh
+# https://askubuntu.com/a/518376
+find "$1" ! -path "${1%/}/$(basename $PWD)/*" -name '*.zip' -exec sh -c 'x=${1%.*}; unzip -d "${x##*/}" "$1"' _ {} \;