aboutsummaryrefslogtreecommitdiff
path: root/build/oksh
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-10-29 21:53:53 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-10-29 21:53:53 -0400
commit5b25c5155312f626813e0d36b7933f5eba801dd2 (patch)
tree6e264a92dbe13ed77821a5c5bd536b6701768442 /build/oksh
parente9b933ea6ce85f5d4f4653b7e5e6a7c836fcc893 (diff)
downloaddotfiles-5b25c5155312f626813e0d36b7933f5eba801dd2.tar.gz
dotfiles-5b25c5155312f626813e0d36b7933f5eba801dd2.tar.xz
Major dotfile cleanup
Diffstat (limited to 'build/oksh')
-rwxr-xr-xbuild/oksh33
1 files changed, 33 insertions, 0 deletions
diff --git a/build/oksh b/build/oksh
new file mode 100755
index 0000000..3588d76
--- /dev/null
+++ b/build/oksh
@@ -0,0 +1,33 @@
+#!/bin/sh
+set -e
+set -x
+relver="6.9"
+build_dir="/v/autobuild/oksh"
+
+export LDFLAGS="-static"
+PREFIX="${PREFIX:-$HOME/pkg}"
+
+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="$PREFIX/bin" --enable-ksh \
+ --enable-static
+make
+make install -j$(nproc)
+