diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2016-09-17 11:06:16 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2016-09-17 11:06:16 +0200 |
commit | 903cb02e7235bbdcc5e77373836bc8eb36e5ec65 (patch) | |
tree | 2b1bec150215df82a88bb40a1301ed6617988bc8 /tools/extractAll.sh | |
parent | 62a12afffa6e27aaee3215fa9746633e407e9929 (diff) | |
download | eumel-903cb02e7235bbdcc5e77373836bc8eb36e5ec65.tar.gz eumel-903cb02e7235bbdcc5e77373836bc8eb36e5ec65.tar.bz2 eumel-903cb02e7235bbdcc5e77373836bc8eb36e5ec65.zip |
Add disk extraction tools
Diffstat (limited to 'tools/extractAll.sh')
-rwxr-xr-x | tools/extractAll.sh | 21 |
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 + |