aboutsummaryrefslogtreecommitdiff
path: root/muslbuild/oksh
diff options
context:
space:
mode:
Diffstat (limited to 'muslbuild/oksh')
-rwxr-xr-xmuslbuild/oksh33
1 files changed, 33 insertions, 0 deletions
diff --git a/muslbuild/oksh b/muslbuild/oksh
new file mode 100755
index 0000000..23213cf
--- /dev/null
+++ b/muslbuild/oksh
@@ -0,0 +1,33 @@
+#!/bin/sh
+set -e
+set -x
+relver="6.9"
+build_dir="/v/muslbuild/oksh"
+
+export CC="musl-gcc -static"
+PREFIX="$HOME/musl"
+
+if ! [ -d "$build_dir" ] ; then
+ mkdir -p "$build_dir"
+fi
+cd "$build_dir"
+
+arLoc="https://github.com/ibara/oksh/releases/download/oksh-%s/oksh-%s.tar.gz"
+arLoc="$(printf "$arLoc\n" "$relver" "$relver")"
+arFn="oksh-${relver}.tar.gz"
+
+checksum=c08d97b2ac9ee5d88e9e508d27c75502b2d06c20d4c5ab87b496cb3b9951bd35
+
+if ! [ -e "$arFn" ] ; then
+ curl -L -o "$arFn" "$arLoc"
+fi
+
+echo "${checksum} $arFn" | sha256sum -c
+
+tar xzvf "$arFn"
+cd "oksh-${relver}"
+./configure --prefix="$PREFIX" --bindir="$HOME/bin" --enable-ksh \
+ --enable-static
+make
+make install -j$(nproc)
+