diff --git a/src/LinuxM/PDBackup.sh b/src/LinuxM/PDBackup.sh new file mode 100755 index 0000000..5546c8d --- /dev/null +++ b/src/LinuxM/PDBackup.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +folder="/media/$USER/PLAYDATE" # <- Put path to Playdate's root here + +if [ ! -d "$folder" ]; then + echo "Please connect your Playdate in data disk mode" + echo "You can do this by going to Settings -> System -> Reboot to Data Disk -> OK on the Playdate" + exit 1 +fi + +printf "Enter date, no spaces please " +read tdate + +printf "Copying saves, this may take a moment\n" +cp -r $folder/Data . + +printf "Copying games, this WILL take a while\n" +cp -r $folder/Games . + +printf "Tarballing Saves and Games\n" +tar cf PDSavesNGames$tdate.tar Data/ Games/ + +printf "Gziping tarball\n" +gzip PDSavesNGames$tdate.tar + +rm -rf Data +rm -rf Games + +printf "Done\n" \ No newline at end of file diff --git a/src/LinuxR/PDBackup.sh b/src/LinuxR/PDBackup.sh new file mode 100755 index 0000000..bda3a98 --- /dev/null +++ b/src/LinuxR/PDBackup.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +folder="/run/media/$USER/PLAYDATE" # <- Put path to Playdate's root here + +if [ ! -d "$folder" ]; then + echo "Please connect your Playdate in data disk mode" + echo "You can do this by going to Settings -> System -> Reboot to Data Disk -> OK on the Playdate" + exit 1 +fi + +printf "Enter date, no spaces please " +read tdate + +printf "Copying saves, this may take a moment\n" +cp -r $folder/Data . + +printf "Copying games, this WILL take a while\n" +cp -r $folder/Games . + +printf "Tarballing Saves and Games\n" +tar cf PDSavesNGames$tdate.tar Data/ Games/ + +printf "Gziping tarball\n" +gzip PDSavesNGames$tdate.tar + +rm -rf Data +rm -rf Games + +printf "Done\n" \ No newline at end of file diff --git a/PDBackup.sh b/src/mac/PDBackup.sh similarity index 100% rename from PDBackup.sh rename to src/mac/PDBackup.sh