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 | 12989393311cdca62f376bea6883ee36e8fa43ac (patch) | |
tree | adeb4f42250bfaa887b08539d98c27b26935bcef /extractAll.sh | |
download | eumel-tools-12989393311cdca62f376bea6883ee36e8fa43ac.tar.gz eumel-tools-12989393311cdca62f376bea6883ee36e8fa43ac.tar.bz2 eumel-tools-12989393311cdca62f376bea6883ee36e8fa43ac.zip |
Add disk extraction tools
Diffstat (limited to 'extractAll.sh')
-rwxr-xr-x | extractAll.sh | 21 |
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 + |