diff options
Diffstat (limited to 'build/oksh')
| -rwxr-xr-x | build/oksh | 33 |
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) + |
