Updated copy-command
This commit is contained in:
@@ -3,12 +3,12 @@
|
|||||||
# Simple script to backup savegames and roms to a network share on each game end/shut down
|
# Simple script to backup savegames and roms to a network share on each game end/shut down
|
||||||
# Save the file at /home/pi/.emulationstation/scripts/quit/ and it will run automatically on shutdown
|
# Save the file at /home/pi/.emulationstation/scripts/quit/ and it will run automatically on shutdown
|
||||||
|
|
||||||
BACKUPPATH="/mnt/megabyte/Retro Games/Roms/savegames/"
|
BACKUPPATH="/mnt/megabyte/Retro Games/Roms"
|
||||||
LOCALPATH="/home/pi/RetroPie/roms/"
|
LOCALPATH="/home/pi/RetroPie/roms"
|
||||||
|
|
||||||
# Search through folders for *.srm files
|
# Search through folders for *.srm files
|
||||||
# Copy *.srm files from the folders, into network share with the same parent folder
|
# Copy *.srm files from the folders, into network share with the same parent folder
|
||||||
|
|
||||||
find $LOCALPATH -name "*.srm" -type f -exec cp {} $BACKUPPATH \;
|
find $LOCALPATH -name *.srm | while read filepath; do dir="$(echo $filepath | awk -F'/' '{print $(NF-1)}')"; cp -v "$filepath" "$BACKUPPATH/$dir/."; done;
|
||||||
|
|
||||||
# Exit
|
# Exit
|
||||||
Reference in New Issue
Block a user