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)}"
|
PKG_VSN="${PKG_VSN:-$(./pkg-vsn.sh)}"
|
||||||
export PKG_VSN
|
export PKG_VSN
|
||||||
|
|
||||||
SYSTEM="$(./scripts/get-distro.sh)"
|
SYSTEM="${SYSTEM:-$(./scripts/get-distro.sh)}"
|
||||||
|
|
||||||
##
|
##
|
||||||
## Support RPM and Debian based linux systems
|
## Support RPM and Debian based linux systems
|
||||||
|
|
|
@ -27,7 +27,7 @@ esac
|
||||||
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
||||||
|
|
||||||
OTP_VSN="${OTP_VSN:-$(./scripts/get-otp-vsn.sh)}"
|
OTP_VSN="${OTP_VSN:-$(./scripts/get-otp-vsn.sh)}"
|
||||||
SYSTEM="$(./scripts/get-distro.sh)"
|
SYSTEM="${SYSTEM:-$(./scripts/get-distro.sh)}"
|
||||||
|
|
||||||
UNAME="$(uname -m)"
|
UNAME="$(uname -m)"
|
||||||
case "$UNAME" in
|
case "$UNAME" in
|
||||||
|
|
|
@ -62,10 +62,11 @@ pushd _upgrade_base
|
||||||
for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
|
for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
|
||||||
filename="$PROFILE-${tag#[e|v]}-otp$OTP_VSN-$SYSTEM-$ARCH.zip"
|
filename="$PROFILE-${tag#[e|v]}-otp$OTP_VSN-$SYSTEM-$ARCH.zip"
|
||||||
url="https://www.emqx.com/downloads/$DIR/${tag#[e|v]}/$filename"
|
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
|
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}"
|
curl -L -o "${filename}" "${url}"
|
||||||
if [ "$SYSTEM" != "centos6" ]; then
|
if [ "$SYSTEM" != "centos6" ]; then
|
||||||
|
echo "downloading sha256 sum from ${url}.sha256 ..."
|
||||||
curl -L -o "${filename}.sha256" "${url}.sha256"
|
curl -L -o "${filename}.sha256" "${url}.sha256"
|
||||||
SUMSTR=$(cat "${filename}.sha256")
|
SUMSTR=$(cat "${filename}.sha256")
|
||||||
echo "got sha265sum: ${SUMSTR}"
|
echo "got sha265sum: ${SUMSTR}"
|
||||||
|
|
Loading…
Reference in New Issue