2014-10-11 16:31:49 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-07-31 07:02:42 -04:00
|
|
|
{
|
2016-08-04 11:29:14 -04:00
|
|
|
# NOTE: compile.sh looks for this file in order to determine if this is the Cuberite folder.
|
|
|
|
# Please modify compile.sh if you want to rename or remove this file.
|
|
|
|
# This file was chosen arbitrarily and it is a good enough indicator that we are in the Cuberite folder.
|
2016-07-31 07:02:42 -04:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2017-02-13 15:36:23 -05:00
|
|
|
KERNEL=$(uname -s)
|
|
|
|
|
|
|
|
echo "Identifying kernel: $KERNEL"
|
|
|
|
|
|
|
|
if [ "$KERNEL" = "Linux" ]; then
|
|
|
|
PLATFORM=$(uname -m)
|
|
|
|
|
|
|
|
echo "Identifying platform: $PLATFORM"
|
|
|
|
|
|
|
|
case $PLATFORM in
|
2020-03-24 17:16:54 -04:00
|
|
|
"i686") DOWNLOADURL="https://download.cuberite.org/linux-i686/Cuberite.tar.gz" ;;
|
|
|
|
"x86_64") DOWNLOADURL="https://download.cuberite.org/linux-x86_64/Cuberite.tar.gz" ;;
|
2017-02-13 15:36:23 -05:00
|
|
|
# Assume that all arm devices are a raspi for now.
|
2020-03-24 17:16:54 -04:00
|
|
|
arm*) DOWNLOADURL="https://download.cuberite.org/linux-armhf-raspbian/Cuberite.tar.gz"
|
2017-02-13 15:36:23 -05:00
|
|
|
esac
|
2020-04-09 16:36:45 -04:00
|
|
|
elif [ "$KERNEL" = "Darwin" ]; then
|
|
|
|
# All Darwins we care about are x86_64
|
|
|
|
DOWNLOADURL="https://download.cuberite.org/darwin-x86_64/Cuberite.tar.gz"
|
2020-03-24 17:16:54 -04:00
|
|
|
#elif [ "$KERNEL" = "FreeBSD" ]; then
|
|
|
|
# DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20FreeBSD%20x64%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz"
|
2017-02-13 15:36:23 -05:00
|
|
|
else
|
|
|
|
echo "Unsupported kernel."
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-10-11 16:31:49 -04:00
|
|
|
|
|
|
|
echo "Downloading precompiled binaries."
|
2020-03-24 17:16:54 -04:00
|
|
|
curl -Ls $DOWNLOADURL | tar -xzf -
|
2014-10-11 16:31:49 -04:00
|
|
|
echo "Done."
|
|
|
|
|
2015-10-31 18:25:21 -04:00
|
|
|
echo "Cuberite is now installed, run using 'cd Server; ./Cuberite'."
|
2016-07-31 07:02:42 -04:00
|
|
|
|
|
|
|
}
|