summaryrefslogtreecommitdiff
path: root/extractAll.sh
diff options
context:
space:
mode:
Diffstat (limited to 'extractAll.sh')
-rwxr-xr-xextractAll.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/extractAll.sh b/extractAll.sh
new file mode 100755
index 0000000..6139475
--- /dev/null
+++ b/extractAll.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+root=`dirname "$0"`
+root=`realpath "$root"`
+
+while read -r F; do
+ base=`basename "$F"`
+ linear=`mktemp`
+ destdir="${base}.extracted"
+ echo "Extracting $F to $destdir"
+ $root/linearizeDisk.py "$F" "$linear"
+ $root/extractArchive.py -o "$destdir" "$linear"
+ pushd "$destdir" || continue
+ for G in ./*; do
+ echo "Converting $G to ${G}.txt"
+ $root/convertFileDs.py "$G" > "${G}.txt" || rm "${G}.txt"
+ done
+ popd
+ rm "$linear"
+done
+