diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2023-01-21 08:37:18 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2023-12-12 23:30:26 +0100 |
| commit | 2e7f9461dddbcb0f054b9dbd005e6eecd02eb07f (patch) | |
| tree | d6b9db7ad832e7c440e88cae014e7809a96138f0 | |
| parent | 833c30776aafdd62e948afd6fc03c83f3b5ca140 (diff) | |
Add Hare installation script for Codespaces
| -rwxr-xr-x | codespace/hare.sh | 43 | ||||
| -rwxr-xr-x[-rw-r--r--] | codespace/tools.sh (renamed from codespace.sh) | 0 |
2 files changed, 43 insertions, 0 deletions
diff --git a/codespace/hare.sh b/codespace/hare.sh new file mode 100755 index 0000000..e780d01 --- /dev/null +++ b/codespace/hare.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +export PREFIX=/opt/hare + +gitenter() { + local package="$1" + local repo="$2" + + echo "### $package ###" + + local src="$PREFIX/build/$1" + git clone "$repo" "$src" + pushd "$src" +} + +gitenter qbe git://c9x.me/qbe.git + make PREFIX=$PREFIX + make install PREFIX=$PREFIX +popd + +gitenter scdoc https://git.sr.ht/~sircmpwn/scdoc + make PREFIX=$PREFIX + make install PREFIX=$PREFIX +popd + +gitenter harec https://git.sr.ht/~sircmpwn/harec + mkdir build + cd build + QBE=/opt/hare/bin/qbe ../configure --prefix=$PREFIX + make + make install +popd + +gitenter hare https://git.sr.ht/~sircmpwn/hare + cat config.example.mk \ + | sed 's:/usr/local:/opt/hare:' \ + | sed 's:harec:/opt/hare/bin/harec:' \ + | sed 's:qbe:/opt/hare/bin/qbe:' \ + | sed 's:scdoc:/opt/hare/bin/scdoc:' \ + > config.mk + make + make install +popd diff --git a/codespace.sh b/codespace/tools.sh index 147f1fb..147f1fb 100644..100755 --- a/codespace.sh +++ b/codespace/tools.sh |
