fix(build): also make SYSTEM configurable by env variable
This commit is contained in:
parent
b7d07d7a96
commit
f25b8801b4
2
build
2
build
|
@ -18,7 +18,7 @@ cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")"
|
|||
PKG_VSN="${PKG_VSN:-$(./pkg-vsn.sh)}"
|
||||
export PKG_VSN
|
||||
|
||||
SYSTEM="$(./scripts/get-distro.sh)"
|
||||
SYSTEM="${SYSTEM:-$(./scripts/get-distro.sh)}"
|
||||
|
||||
##
|
||||
## Support RPM and Debian based linux systems
|
||||
|
|
|
@ -27,7 +27,7 @@ esac
|
|||
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
||||
|
||||
OTP_VSN="${OTP_VSN:-$(./scripts/get-otp-vsn.sh)}"
|
||||
SYSTEM="$(./scripts/get-distro.sh)"
|
||||
SYSTEM="${SYSTEM:-$(./scripts/get-distro.sh)}"
|
||||
|
||||
UNAME="$(uname -m)"
|
||||
case "$UNAME" in
|
||||
|
|
|
@ -62,10 +62,11 @@ pushd _upgrade_base
|
|||
for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
|
||||
filename="$PROFILE-${tag#[e|v]}-otp$OTP_VSN-$SYSTEM-$ARCH.zip"
|
||||
url="https://www.emqx.com/downloads/$DIR/${tag#[e|v]}/$filename"
|
||||
echo "downloading base package from ${url} ..."
|
||||
if [ ! -f "$filename" ] && curl -I -m 10 -o /dev/null -s -w "%{http_code}" "${url}" | grep -q -oE "^[23]+" ; then
|
||||
echo "downloading base package from ${url} ..."
|
||||
curl -L -o "${filename}" "${url}"
|
||||
if [ "$SYSTEM" != "centos6" ]; then
|
||||
echo "downloading sha256 sum from ${url}.sha256 ..."
|
||||
curl -L -o "${filename}.sha256" "${url}.sha256"
|
||||
SUMSTR=$(cat "${filename}.sha256")
|
||||
echo "got sha265sum: ${SUMSTR}"
|
||||
|
|
Loading…
Reference in New Issue