Guest User

KSP Subreddit Git Save Script

a guest
Aug 11th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. echo "If this isn't in your KSP/saves folder, you're gonna have have a bad time."
  2. select ud in "Pull" "Push"; do
  3.     case $ud in
  4.         Pull ) if [ ! -d "GitPublicSave" ]; then
  5.                 git clone https://github.com/RGood/GitPublicSave.git
  6.                 exit
  7.             else
  8.                 cd ./GitPublicSave/
  9.                 git pull
  10.                 exit
  11.             fi;;
  12.         Push )  if [ ! -d "GitPublicSave" ]; then
  13.                 echo "Nothing to do here.  Nothing to upload.  No \"GitPublicSave\" folder."
  14.                 exit
  15.             else    cd ./GitPublicSave
  16.                 git add *
  17.                 git commit -m "Automatic upload from Camoceltic's Git 'er Done Shell Script."
  18.                 git push
  19.                 exit
  20.             fi;;
  21.     esac
  22. done
  23. exit
Add Comment
Please, Sign In to add comment