Skip to content

Instantly share code, notes, and snippets.

@sweepies
Created March 25, 2016 17:22
Show Gist options
  • Select an option

  • Save sweepies/b4ecad13417e3bafd7b0 to your computer and use it in GitHub Desktop.

Select an option

Save sweepies/b4ecad13417e3bafd7b0 to your computer and use it in GitHub Desktop.
#!/bin/bash
USER=winterfox
PERM=0776
read -r -p "This will update paperclip.jar to the latest version. Continue? (y/n) " response
response=${response,,}
if [[ $response =~ ^(yes|y)$ ]]
then
echo Removing old paperclip.jar..
rm paperclip.jar
echo Downloading new jar..
wget -4 https://ci.destroystokyo.com/job/PaperSpigot/lastSuccessfulBuild/artifact/paperclip.jar
echo Fixing permissions..
sudo chmod $PERM ./smp1.jar
sudo chmod $PERM ./paperclip.jar
sudo chown $USER ./smp1.jar
sudo chown $USER ./paperclip.jar
echo Complete!
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment