diff --git a/seqs/matterbridge.sh b/seqs/matterbridge.sh index 646aa3d..b211ef0 100755 --- a/seqs/matterbridge.sh +++ b/seqs/matterbridge.sh @@ -127,14 +127,27 @@ step_12() { } -step_30_info() { echo "Download go"; } +step_30_info() { + echoinfoArgs "[OPTIONS]" + echo "Download go" + echoinfo " [OPTIONS]" + echoinfo " --arch, -a : armhf(default), arm64" + echoinfo " CPU architecture for downloading go sources" +} step_30_alias() { ALIAS="build"; } step_30() { + shift local goVer="$(curl --silent -L https://go.dev/doc/devel/release | \ grep --max-count 1 -E "go[[:digit:]\.]{3,}" |\ sed 's/.*go\([[:digit:]\.]\+\).*/\1/g')" - local goArch="armv6l" #arm64" + local goArch="armhf" #arm64" local goDownUrl="https://go.dev/dl/go${goVer}.linux-${goArch}.tar.gz" + case "${1}" in + --arch|-a) + goArch="${2}" + shift 2 ;; + esac + [[ "${goArch}" == "armhf" ]] && goArch="armv6l" # Download latest go if [ ! -e "${goDir}" ] ; then