diff --git a/README.md b/README.md index 8080b32..5d187bb 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ This tool will back up your games, and save files from your playdate to your com 3. Run the script `./PDBackup.sh` and choose if you want to back up just your saves, or games, or both. +>[!TIP] +> The default output is a zip file, if you want a tar.gz, run `./PDBackup.sh -t` + ## Scrip is Throwing Error 1. Make sure your Playdate is in Data Disk Mode diff --git a/src/LinuxM/PDBackup.sh b/src/LinuxM/PDBackup.sh index adec534..7aefcad 100755 --- a/src/LinuxM/PDBackup.sh +++ b/src/LinuxM/PDBackup.sh @@ -47,11 +47,20 @@ if [ $choice == "b" ]; then fi -printf "Tarballing Saves and Games\n" -tar cf PDBackup$tdate.tar Playdate/ +if [ $1 == "-t" ]; then -printf "Gziping tarball\n" -gzip PDBackup$tdate.tar + printf "Tarballing files\n" + tar cf PDBackup$tdate.tar Playdate/ + + printf "Gziping tarball\n" + gzip PDBackup$tdate.tar + +else + + printf "Zipping files\n" + zip -r PDBackup$tdate.zip Playdate/ 2>/dev/null 1>&2 + +fi rm -rf Playdate diff --git a/src/LinuxR/PDBackup.sh b/src/LinuxR/PDBackup.sh index ce63031..eacee9e 100755 --- a/src/LinuxR/PDBackup.sh +++ b/src/LinuxR/PDBackup.sh @@ -47,11 +47,20 @@ if [ $choice == "b" ]; then fi -printf "Tarballing Saves and Games\n" -tar cf PDBackup$tdate.tar Playdate/ +if [ $1 == "-t" ]; then -printf "Gziping tarball\n" -gzip PDBackup$tdate.tar + printf "Tarballing files\n" + tar cf PDBackup$tdate.tar Playdate/ + + printf "Gziping tarball\n" + gzip PDBackup$tdate.tar + +else + + printf "Zipping files\n" + zip -r PDBackup$tdate.zip Playdate/ 2>/dev/null 1>&2 + +fi rm -rf Playdate diff --git a/src/mac/PDBackup.sh b/src/mac/PDBackup.sh index bf4caae..931e591 100755 --- a/src/mac/PDBackup.sh +++ b/src/mac/PDBackup.sh @@ -47,11 +47,20 @@ if [ $choice == "b" ]; then fi -printf "Tarballing Saves and Games\n" -tar cf PDBackup$tdate.tar Playdate/ +if [ $1 == "-t" ]; then -printf "Gziping tarball\n" -gzip PDBackup$tdate.tar + printf "Tarballing files\n" + tar cf PDBackup$tdate.tar Playdate/ + + printf "Gziping tarball\n" + gzip PDBackup$tdate.tar + +else + + printf "Zipping files\n" + zip -r PDBackup$tdate.zip Playdate/ 2>/dev/null 1>&2 + +fi rm -rf Playdate