summaryrefslogtreecommitdiff
path: root/tools/extractAll.sh
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2016-09-17 11:06:16 +0200
committerLars-Dominik Braun <lars@6xq.net>2016-09-17 11:06:16 +0200
commit903cb02e7235bbdcc5e77373836bc8eb36e5ec65 (patch)
tree2b1bec150215df82a88bb40a1301ed6617988bc8 /tools/extractAll.sh
parent62a12afffa6e27aaee3215fa9746633e407e9929 (diff)
downloadeumel-903cb02e7235bbdcc5e77373836bc8eb36e5ec65.tar.gz
eumel-903cb02e7235bbdcc5e77373836bc8eb36e5ec65.tar.bz2
eumel-903cb02e7235bbdcc5e77373836bc8eb36e5ec65.zip
Add disk extraction tools
Diffstat (limited to 'tools/extractAll.sh')
-rwxr-xr-xtools/extractAll.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/extractAll.sh b/tools/extractAll.sh
new file mode 100755
index 0000000..6139475
--- /dev/null
+++ b/tools/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
+