Last active
December 8, 2024 09:32
-
-
Save eggplants/5b9f844e2bc220160b2f24577739eba6 to your computer and use it in GitHub Desktop.
build sl-h (patched sl, created by: jsdfq43wtr)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# built binaries: https://github.com/eggplants/sl-h_binary | |
set -euo pipefail | |
set -x | |
# Ubuntu: apt update && apt install build-essential curl libncurses5-dev -y | |
# Mac: brew update && brew install curl gcc ncurses make | |
if ! command -v curl gcc make &> /dev/null; then | |
echo "require: build-essential curl libncurses5-dev" >&2 | |
exit 1 | |
elif command -v brew &> /dev/null && brew list | grep -q ncurses; then | |
echo "require: ncurses" >&2 | |
exit 1 | |
elif ! [ -f /usr/include/ncurses.h ]; then | |
echo "require: ncurses" >&2 | |
exit 1 | |
fi | |
# sl (2.02) | |
curl -Lo sl.tar 'https://web.archive.org/web/20070220170601if_/http://www.tkl.iis.u-tokyo.ac.jp:80/~toyoda/sl/sl.tar' | |
tar xopf sl.tar | |
pushd sl | |
# sl-h (sl5-1.patch) | |
curl -Lo sl5-1.patch 'https://www.izumix.xyz/sl/sl5-1.patch' | |
patch -p1 < sl5-1.patch | |
sed s_ncurses/__ sl.c > _ | |
mv _ sl.c | |
make | |
popd | |
mv sl/sl sl-h | |
rm -rf sl sl.tar | |
echo "done! Try: ./sl-h" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment