-
-
Save bglopez/e5afae103322a69f072f08ab55ddfb17 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 | |
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 command -v apt &> /dev/null && apt list --installed | grep -q ncurses; 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 | |
cd sl | |
# sl-h (sl5-1.patch) | |
curl -Lo sl5-1.patch 'https://web.archive.org/web/20090316133609/http://www.izumix.org.uk:80/sl/sl5-1.patch' | |
patch -p1 < sl5-1.patch | |
sed s_ncurses/__ sl.c > _ | |
mv _ sl.c | |
make && mv sl sl-h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment