diff options
author | Aaron Ball <nullspoon@iohq.net> | 2016-10-07 19:03:47 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2016-10-07 19:03:47 -0600 |
commit | 6ceda7e3e675318dab36b067f516999625bbae57 (patch) | |
tree | 0dea58daebf36527864fa38d7098ec700b9c485e /andbackup.sh | |
parent | 4f826dd335d96b2d04b1414b3ba53b09860c7ffc (diff) | |
download | andbackup-6ceda7e3e675318dab36b067f516999625bbae57.tar.gz andbackup-6ceda7e3e675318dab36b067f516999625bbae57.tar.xz |
Converted backup compression from bzip2 to gzip
Bzip2 isn't available on all android devices, as it is usually installed
with busybox or toybox. Gzip however is available in vanilla android.
Diffstat (limited to 'andbackup.sh')
-rwxr-xr-x | andbackup.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/andbackup.sh b/andbackup.sh index 2093832..9bb3326 100755 --- a/andbackup.sh +++ b/andbackup.sh @@ -67,8 +67,7 @@ function backup_app { # Compress the backup echo "Compressing userdata for ${app}" cd ${backups}/${app}/ - tar -cf data.tar data - bzip2 -f data.tar + tar -c data | gzip -c > data.tar.gz rm -rf data } @@ -117,7 +116,7 @@ function restore_app { # Decompress backup echo "Decompressing user data for ${app}." cd ${backups}/${app}/ - bunzip2 -c data.tar.bz2 | tar -x + gzip -d -c data.tar.gz | tar -x # Copy the user data in cp -rp ${backups}/${app}/data/* ${data}/ |