summaryrefslogtreecommitdiffstats
path: root/easyinstall.sh
diff options
context:
space:
mode:
authorBond-009 <Bond-009@users.noreply.github.com>2017-02-13 21:36:23 +0100
committerMattes D <github@xoft.cz>2017-02-13 21:36:23 +0100
commitd67b57353652b469051d4312c25be2e4712f2e39 (patch)
tree3a31c9200cea94a654a9f7a5648ee1b8c6f36e66 /easyinstall.sh
parentStringUtils: Dropped an unneeded copy in lower-/upper-casing. (#3512) (diff)
downloadcuberite-d67b57353652b469051d4312c25be2e4712f2e39.tar
cuberite-d67b57353652b469051d4312c25be2e4712f2e39.tar.gz
cuberite-d67b57353652b469051d4312c25be2e4712f2e39.tar.bz2
cuberite-d67b57353652b469051d4312c25be2e4712f2e39.tar.lz
cuberite-d67b57353652b469051d4312c25be2e4712f2e39.tar.xz
cuberite-d67b57353652b469051d4312c25be2e4712f2e39.tar.zst
cuberite-d67b57353652b469051d4312c25be2e4712f2e39.zip
Diffstat (limited to 'easyinstall.sh')
-rwxr-xr-xeasyinstall.sh32
1 files changed, 23 insertions, 9 deletions
diff --git a/easyinstall.sh b/easyinstall.sh
index 150282f6c..b73f73173 100755
--- a/easyinstall.sh
+++ b/easyinstall.sh
@@ -7,15 +7,29 @@
set -e
-PLATFORM=$(uname -m)
-
-echo "Identifying platform: $PLATFORM"
-case $PLATFORM in
- "i686") DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20Linux%20x86%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz" ;;
- "x86_64") DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20Linux%20x64%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz" ;;
- # Assume that all arm devices are a raspi for now.
- arm*) DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20Linux%20raspi-armhf%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz"
-esac
+KERNEL=$(uname -s)
+
+echo "Identifying kernel: $KERNEL"
+
+if [ "$KERNEL" = "Linux" ]; then
+ PLATFORM=$(uname -m)
+
+ echo "Identifying platform: $PLATFORM"
+
+ case $PLATFORM in
+ "i686") DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20Linux%20x86%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz" ;;
+ "x86_64") DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20Linux%20x64%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz" ;;
+ # Assume that all arm devices are a raspi for now.
+ arm*) DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20Linux%20raspi-armhf%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz"
+ esac
+elif [ "$KERNEL" = "Darwin" ]; then
+ DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20OSX%20x64%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz"
+elif [ "$KERNEL" = "FreeBSD" ]; then
+ DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20FreeBSD%20x64%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz"
+else
+ echo "Unsupported kernel."
+ exit 1
+fi
echo "Downloading precompiled binaries."
curl -s $DOWNLOADURL | tar -xzf -