Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. if [ "$#" -ne 1 ]; then
  4. echo "Usage: ./savegames.sh <dest-folder>"
  5. exit
  6. fi
  7.  
  8. BACKUP_FOLDER=$1
  9. echo $BACKUP_FOLDER
  10.  
  11. if [ ! -d $BACKUP_FOLDER ]; then
  12. echo "Folder doesn't exist!"
  13. exit
  14. fi
  15.  
  16. function backup_game {
  17. tar -cf "$BACKUP_FOLDER/$1_$(date +%Y_%m_%d).tar.gz" "${@:2}"
  18. }
  19.  
  20. USER=<YOUR-USER-HERE>
  21.  
  22. backup_game "Borderlands2" "/home/$USER/.local/share/aspyr-media/borderlands 2/willowgame/savedata"
  23. backup_game "SystemShock2" "/home/$USER/.systemshock2/systemshock2/drive_c/Program Files/SystemShock2/save_"*
  24. backup_game "Minecraft" "/home/$USER/.minecraft/saves"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement