From 5f8293095da535bf0269dd6d4f965cee9b05d1d0 Mon Sep 17 00:00:00 2001 From: takeshix Date: Mon, 19 Apr 2021 11:55:27 +0200 Subject: [PATCH] Added building helper scripts --- build/01_init.sh | 4 ++++ build/02_install_build_compiler.sh | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 build/01_init.sh create mode 100755 build/02_install_build_compiler.sh diff --git a/build/01_init.sh b/build/01_init.sh new file mode 100755 index 0000000..bd62b59 --- /dev/null +++ b/build/01_init.sh @@ -0,0 +1,4 @@ +#!/bin/sh +p=$(dirname "$0") +apk update && apk add bash +"$p"/install_deps_alpine.sh \ No newline at end of file diff --git a/build/02_install_build_compiler.sh b/build/02_install_build_compiler.sh new file mode 100755 index 0000000..b606c55 --- /dev/null +++ b/build/02_install_build_compiler.sh @@ -0,0 +1,20 @@ +#!/bin/bash +if [ $# -ne 1 ];then + echo "Missing arch" + exit 1 +fi +ARCH="${1,,}" +case $ARCH in + x86|x86_64|i686|arm|armhf|aarch64) + ARCH="${ARCH}-linux-musl" + ;; + *) + echo "Invalid arch ${ARCH}" + exit 1 + ;; +esac +HOST=http://musl.cc +cd / +curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz +tar -xf ${ARCH}-cross.tgz +rm ${ARCH}-cross.tgz \ No newline at end of file