diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2023-12-11 21:12:27 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2023-12-12 23:30:27 +0100 |
| commit | 9e1eb31b4f2dfbfb8ac0e0351cc23bd2964bbb1a (patch) | |
| tree | 80f30e612f6567b7e7f379c89df51c480da52476 | |
| parent | 6960cba013188972f53a2b8b6f224f4f9f7d87ac (diff) | |
Remove codespace scripts, don't use or maintain them anymore
| -rwxr-xr-x | codespace/hare.sh | 59 | ||||
| -rw-r--r-- | codespace/rust.sh | 13 | ||||
| -rwxr-xr-x | codespace/tools.sh | 53 |
3 files changed, 0 insertions, 125 deletions
diff --git a/codespace/hare.sh b/codespace/hare.sh deleted file mode 100755 index 9c9211c..0000000 --- a/codespace/hare.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash - -if [ "$CODESPACES" != "true" ]; then - echo "ERROR: not in a codespace." >&2 - exit 1 -fi - -export PREFIX=/opt/hare - -gitenter() { - local package="$1" - local repo="$2" - - echo "### $package ###" - - local src="$PREFIX/build/$1" - if [[ -d "$src" ]]; then - git -C "$src" pull - else - git clone "$repo" "$src" - fi - 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 - -for bin in $PREFIX/bin/*; do - local linkname="$HOME/.local/bin/$(basename "$bin")" - if [[ ! -e "$linkname" ]]; then - ln -s "$bin" "$linkname" - fi -done diff --git a/codespace/rust.sh b/codespace/rust.sh deleted file mode 100644 index eb70aea..0000000 --- a/codespace/rust.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -if [ "$CODESPACES" != "true" ]; then - echo "ERROR: not in a codespace." >&2 - exit 1 -fi - -curl -s https://sh.rustup.rs | sh -s -- -y --component rust-analyzer - -# For some reason, rustup does not create symbolic links to the rust-analyzer -# binary, so create one. -source "$HOME/.cargo/env" -ln -s "$(rustup which rust-analyzer)" ~/.local/bin/rust-analyzer diff --git a/codespace/tools.sh b/codespace/tools.sh deleted file mode 100755 index 147f1fb..0000000 --- a/codespace/tools.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash - -if [ "$CODESPACES" != "true" ]; then - echo "ERROR: not in a codespace." >&2 - exit 1 -fi - -if [ ! -x "$(command -v gh)" ]; then - echo "ERROR: missing \`gh\` command." >&2 - exit 1 -fi - -instopt() { - local repo="$1"; shift - local bin="$1"; shift - local pat="$1"; shift - - local name="$(basename "$repo")" - echo "### $name ###" - mkdir -p "/opt/$name" - pushd "/opt/$name" >/dev/null - - gh release download -R "$repo" -p "$pat" --clobber - if [[ "$pat" =~ \.zip$ ]]; then - unzip -o $pat "$@" >/dev/null - else - tar -xvf $pat "$@" >/dev/null - fi - - local linkname="$HOME/.local/bin/$(basename "$bin")" - if [[ ! -e "$linkname" ]]; then - ln -s "$(pwd)/$bin" "$linkname" - fi - - popd >/dev/null -} - -instopt burntsushi/ripgrep \ - rg '*-x86_64-unknown-linux-musl.tar.gz' --strip-components=1 -instopt denoland/deno \ - deno '*-x86_64-unknown-linux-gnu.zip' -instopt junegunn/fzf \ - fzf '*-linux_amd64.tar.gz' -instopt neovim/neovim \ - bin/nvim '*-linux64.tar.gz' --strip-components=1 -instopt sharkdp/bat \ - bat '*-x86_64-unknown-linux-gnu.tar.gz' --strip-components=1 -instopt sharkdp/fd \ - fd '*-x86_64-unknown-linux-gnu.tar.gz' --strip-components=1 -instopt zellij-org/zellij \ - zellij '*-x86_64-unknown-linux-musl.tar.gz' - -nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerSync" |
