diff options
-rwxr-xr-x | andbackup.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/andbackup.sh b/andbackup.sh index e7f2c1d..51b41eb 100755 --- a/andbackup.sh +++ b/andbackup.sh @@ -158,21 +158,21 @@ backup_app() { linfo "Skipping application force stop while booted to recovery mode." fi - tar="tar -C ${data} -c " + taropts=" -C ${data} -c " # Delete cache directory if it exists # This will sometimes free up significant amounts of space if [[ ! -d "${data}/cache" ]]; then linfo "Cache doesn't exist for ${app}" elif [ "$preserve_cache" -eq 0 ]; then linfo "Excluding cache for ${app}" - tar="${tar} --exclude=cache" + taropts="${taropts} --exclude=cache" else linfo "Preserving cache for ${app}" fi # Compress the backup linfo "Compressing userdata for ${app}" - ${tar} . | gzip -c > "${backups}/${app}/data.tar.gz" + eval tar ${taropts} . | gzip -c > "${backups}/${app}/data.tar.gz" } |