twrp-apps-data-restore-tool/0_extract.sh

20 lines
387 B
Bash
Raw Normal View History

2021-04-08 14:38:09 +02:00
#!/bin/bash -e
bashdir="$PWD"
backupdir="$1"
outdir="work"
if [ -z "$backupdir" ]
then
echo "You must supply the path of the backup directory"
exit 1
fi
mkdir -p "$outdir"
2021-07-31 19:32:54 +02:00
for i in $(find "$backupdir" -name "data.*.win*" ! -name '*.sha2' ! -name '*.info' -type f); do
echo "Extracting file \"$i\""
pv $i | tar -x --overwrite -C "$bashdir/$outdir"
done
2021-04-08 14:38:09 +02:00
echo "Done."