Skip to content

Commit

Permalink
Added LInux scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nathnp committed May 9, 2024
1 parent 71ba08f commit 3705fcd
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/LinuxM/PDBackup.sh
Original file line number Diff line number Diff line change
@@ -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"
29 changes: 29 additions & 0 deletions src/LinuxR/PDBackup.sh
Original file line number Diff line number Diff line change
@@ -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"
File renamed without changes.

0 comments on commit 3705fcd

Please sign in to comment.