Created
December 10, 2011 17:55
-
-
Save fernferret/1455756 to your computer and use it in GitHub Desktop.
Bukkit Updater Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ver="stable" | |
build="-1" | |
if [ -z $1 ] ; then | |
echo "Updating to latest STABLE build." | |
else | |
ver="dev" | |
echo "Updating to latest DEV build." | |
fi | |
if [ -z $2 ] ; then | |
echo "Updating to the latest" | |
else | |
echo "Updating to bukkit $2" | |
ver="dev" | |
build=$2 | |
fi | |
if [ ! -d incoming ] ; then | |
mkdir incoming | |
else | |
rm -rf incoming | |
mkdir incoming | |
fi | |
cd incoming | |
if [[ $ver == "dev" ]] ; then | |
if [ -z $build ] || [[ $build == "-1" ]] ; then | |
wget -N http://ci.bukkit.org/job/dev-CraftBukkit/lastSuccessfulBuild/artifact/*zip*/archive.zip | |
else | |
wget -N "http://ci.bukkit.org/job/dev-CraftBukkit/$build/artifact/*zip*/archive.zip" | |
fi | |
else | |
wget -N http://ci.bukkit.org/job/dev-CraftBukkit/Recommended/artifact/*zip*/archive.zip | |
fi | |
unzip archive.zip | |
cd archive/target/ | |
mv *.jar ../../../craftbukkit.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment