Improved easyinstall.sh to support macOS and FreeBSD (#3557)
This commit is contained in:
parent
72e401313b
commit
d67b573536
@ -16,11 +16,11 @@ There are several ways to obtain Cuberite.
|
|||||||
|
|
||||||
#### Binaries
|
#### Binaries
|
||||||
- The easiest method is downloading for Windows or Linux from the [Project site](https://cuberite.org/).
|
- The easiest method is downloading for Windows or Linux from the [Project site](https://cuberite.org/).
|
||||||
- You can use the EasyInstall script for Linux, which automatically downloads the correct binary. The script is described below.
|
- You can use the EasyInstall script for Linux and macOS, which automatically downloads the correct binary. The script is described below.
|
||||||
- You can also obtain a binary from the [buildserver archive](https://builds.cuberite.org/).
|
- You can also obtain a binary from the [buildserver archive](https://builds.cuberite.org/).
|
||||||
|
|
||||||
##### The EasyInstall script
|
##### The EasyInstall script
|
||||||
This Linux script will download the correct binary from the project site.
|
This script will download the correct binary from the project site.
|
||||||
|
|
||||||
sh -c "$(wget -O - https://download.cuberite.org)"
|
sh -c "$(wget -O - https://download.cuberite.org)"
|
||||||
|
|
||||||
|
@ -7,15 +7,29 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PLATFORM=$(uname -m)
|
KERNEL=$(uname -s)
|
||||||
|
|
||||||
echo "Identifying platform: $PLATFORM"
|
echo "Identifying kernel: $KERNEL"
|
||||||
case $PLATFORM in
|
|
||||||
"i686") DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20Linux%20x86%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz" ;;
|
if [ "$KERNEL" = "Linux" ]; then
|
||||||
"x86_64") DOWNLOADURL="https://builds.cuberite.org/job/Cuberite%20Linux%20x64%20Master/lastSuccessfulBuild/artifact/Cuberite.tar.gz" ;;
|
PLATFORM=$(uname -m)
|
||||||
# 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"
|
echo "Identifying platform: $PLATFORM"
|
||||||
esac
|
|
||||||
|
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."
|
echo "Downloading precompiled binaries."
|
||||||
curl -s $DOWNLOADURL | tar -xzf -
|
curl -s $DOWNLOADURL | tar -xzf -
|
||||||
|
Loading…
Reference in New Issue
Block a user