From 418ddf3743d40f682fff0ad48d1cfd51a368fd06 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Wed, 7 Oct 2020 21:14:39 -0700 Subject: [PATCH] wget -v, .env, readme, -i386, env vars --- Makefile | 3 + README.md | 225 +++++++++++++++++++++++++++- backend/src/test-runner.ts | 2 +- packer/config-certbot.json | 22 --- packer/config.json | 6 +- packer/provision-certbot.bash | 11 -- packer/resources/certbot-post.bash | 3 - packer/resources/certbot-pre.bash | 3 - scripts/deploy.bash | 15 +- scripts/docker-install-phase1.bash | 2 +- scripts/docker-install-phase3b.bash | 2 +- scripts/docker-install-phase4.bash | 110 +++++++------- scripts/docker-install-phase6.bash | 18 +-- 13 files changed, 304 insertions(+), 118 deletions(-) delete mode 100644 packer/config-certbot.json delete mode 100755 packer/provision-certbot.bash diff --git a/Makefile b/Makefile index 2ca3d2e..09b9bfb 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +-include .env +export + UID := $(shell id -u) .PHONY: help diff --git a/README.md b/README.md index 01ff7e4..0c78a73 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,227 @@ and fail the build if they fail. See also [riju-cdn](https://github.com/raxod502/riju-cdn). -## Flag +## Adding a language -[![Flag](flag.png)](https://www.reddit.com/r/Breath_of_the_Wild/comments/947ewf/flag_of_the_gerudo_based_on_the_flag_of_kazakhstan/) +The workflow for adding a language is more streamlined than you might +expect, given that building Riju's Docker image takes over an hour. +This is because there is no need to rebuild the image when a change is +made. Instead, you can manually apply the changes to a running +container in parallel with adding those changes to the Dockerfile +scripts. + +### Install + +The first step in adding a language is figuring out how to install it. +There are a number of considerations here: + +* If it's available from Ubuntu, that's the best option. +* Language-specific package managers are a second-best choice. +* Downloading precompiled binaries is also not the worst. It's best if + upstream offers a .deb download, but manual installation is fine + too. +* Compiling from source is the worst option, but sometimes it's the + only way. + +Typically, I `sudo su` and change directory to `/tmp` in order to test +out installation. Once I've identified a way to install such that the +software appears to function, I transcribe the commands from my shell +back into the relevant Dockerfile script. + +#### Dockerfile scripts + +These are as follows: + +* `docker-install-phase0.bash`: perform initial upgrade of all Ubuntu + packages, unminimize system +* `docker-install-phase1.bash`: configure APT repositories and + additional architectures +* `docker-install-phase2.bash`: install tools that are used for Riju + itself (build and development tools) +* `docker-install-phase3a.bash`: install APT packages for languages + A-D +* `docker-install-phase3b.bash`: install APT packages for languages + E-L +* `docker-install-phase3c.bash`: install APT packages for languages + M-R +* `docker-install-phase3d.bash`: install APT packages for languages + S-Z +* `docker-install-phase4.bash`: install precompiled binaries and + tarballs +* `docker-install-phase5.bash`: set up language-specific package + managers and install packages from them +* `docker-install-phase6.bash`: install things from source +* `docker-install-phase7.bash`: set up project templates for languages + that require you start by running a "create new project" command, + and install custom wrapper scripts +* `docker-install-phase8.bash`: set up access control and do final + cleanup + +#### Rolling-release policy + +You'll notice in these scripts a distinct lack of any version numbers. +This is because Riju uses rolling-release for everything that can +conceivably be rolling-released (even things that look like they're +probably never *going* to get a new release, since the last one was in +2004). + +For APT and language-specific packages, this is typically simple. A +small number of APT packages include a version number as part of their +name for some reason, and I work around this using various +`grep-aptavail` incantations at the top of the `phase-3[ad].bash` +scripts. I suggest checking those examples and referring to the +`grep-aptavail` man page to understand what is going on. + +For binaries and tarballs in `phase4.bash`, a version number is +typically encoded in the download URL. For projects available via +GitHub Releases (preferred), there is a `latest_release` shell +function to fetch the latest tag. For things hosted elsewhere, I +resort to using `curl` and `grep` on the download homepage to identify +the latest version number or download URL. Crafting an appropriate +pipeline for these cases is as much an art as a science. We simply +hope that the relevant webpages will not have their layout changed too +frequently. + +#### Conventions + +* We do all work from `/tmp` and clean up our files when done. (The + current code doesn't always do a great job of this; see + [#27](https://github.com/raxod502/riju/issues/27).) +* When changing directory, we use `pushd` and `popd` in pairs. +* We prefer putting files where they're supposed to be in the first + place, rather than moving (or worse, copying) them. This can be + accomplished by means of `wget -O`, `unzip -d`, `tar -C + [--strip-components]`, and similar. +* We like to keep things as minimal as possible in terms of shell + scripting, but try to follow the standard installation procedure + where reasonable. + +### Running + +There are three categories of languages: non-interactive, interactive, +and interactive+scoped. The capabilities are as follows: + +* *Non-interactive:* You can run a file. +* FIXME + +## Debugging tools + +Add `#debug` to the end of a Riju URL and reload the page to output +all messages in JSON format in the JavaScript console. You can copy +the LSP messages as JSON for direct use in the LSP REPL (see below). + +To get a sandboxed shell session, the same as is used to run languages +on Riju, run: + + $ yarn sandbox + +To start up a JSON REPL for interacting with LSP servers, run: + + $ yarn lsp-repl (LANGUAGE | CMD...) + +## Self-hosting + +Riju is hosted on [DigitalOcean](https://www.digitalocean.com/). Sign +up for an account and obtain a personal access token with read/write +access. + +You will need some credentials. Start by selecting an admin password +to use for the DigitalOcean instance. Then generate two SSH key-pairs +(or you can use pre-existing ones). One is for the admin account on +DigitalOcean, while the other is to deploy from CI. + +Install [Packer](https://www.packer.io/). Riju uses Packer to generate +DigitalOcean AMIs to ensure a consistent setup for the production +instance. Navigate to the `packer` subdirectory of this repository and +create a file `secrets.json`, changing the values as appropriate for +your setup: + +```json +{ + "digitalocean_api_token": "28114a9f0ed5637c576794138c71bf03d01946288a6922ea083f923ec883c431", + "admin_password": "R3iIhqs856N1sT5Mg6QFAsB5VPJrXS", + "admin_ssh_public_key_file": "/home/raxod502/.ssh/id_rsa.pub", + "deploy_ssh_public_key_file": "/home/raxod502/.ssh/id_rsa_riju_deploy.pub" +} +``` + +We'll start by setting up Riju without TLS. Run: + + $ packer build -var-file secrets.json config.json + +This will take about five minutes to generate a DigitalOcean AMI. Log +in to your DigitalOcean and launch an instance based on that AMI +(called an "Image" in the interface). The hosted version of Riju uses +the $10/month instance with 1 vCPU and 2GB memory / 50GB disk. + +Root login is disabled on the AMI generated by Packer, but +DigitalOcean unfortunately doesn't give you any option to leave login +settings unchanged. I suggest setting the root password to a random +string. Make a note of the IP address of the droplet and SSH into it +under the admin user, using the key that you specified in +`secrets.json`. Now perform the following setup: + + $ sudo passwd -l root + +This completes the first DigitalOcean portion of deployment. + +Now you'll need an account on [Docker Hub](https://hub.docker.com/), +which is where built images will be stored before they are pulled down +to DigitalOcean. Create a repository; the name will be +`your-docker-id/whatever-you-name-the-repo`. You'll need this below. + +You're now ready to deploy. You can do this manually to begin with. In +the repository root on your local checkout of Riju, create a file +`.env`, changing the values as appropriate for your setup: + + DOCKER_REPO=raxod502/riju + DOMAIN=riju.codes + DEPLOY_SSH_PRIVATE_KEY=/home/raxod502/.ssh/id_rsa_riju_deploy + +Run: + + $ docker login + $ make deploy + +Riju should now be available online at your instance's public IP +address. + +Next, let's configure TLS. You'll need to configure DNS for your +domain with a CNAME to point at your DigitalOcean instance. Once DNS +has propagated, SSH into your DigitalOcean instance and run: + + $ sudo systemctl stop riju + $ sudo certbot certonly --standalone + $ sudo systemctl start riju + +You'll also want to set up automatic renewal. This can be done by +installing the two Certbot hook scripts from Riju in the +`packer/resources` subdirectory. Here is one approach: + + $ sudo wget https://github.com/raxod502/riju/raw/master/packer/resources/certbot-pre.bash + -O /etc/letsencrypt/renewal-hooks/pre/riju + $ sudo wget https://github.com/raxod502/riju/raw/master/packer/resources/certbot-post.bash + -O /etc/letsencrypt/renewal-hooks/post/riju + $ sudo chmod +x /etc/letsencrypt/renewal-hooks/pre/riju + $ sudo chmod +x /etc/letsencrypt/renewal-hooks/post/riju + +At this point you should be able to visit Riju at your custom browser +with TLS enabled. + +We can now set up CI. Sign up at [CircleCI](https://circleci.com/) and +enable automatic builds for your fork of Riju. You'll need to set the +following environment variables for the Riju project on CircleCI, +adjusting as appropriate for your own setup: + + DOCKER_USERNAME=raxod502 + DOCKER_PASSWORD=MIMvzS1bKPunDDSX4AJu + DOCKER_REPO=raxod502/riju + DOMAIN=riju.codes + DEPLOY_SSH_PRIVATE_KEY=b2Rs......lots more......SFAK + +To obtain the base64-encoded deploy key, run: + + $ cat ~/.ssh/id_rsa_riju_deploy | base64 | tr -d '\n'; echo + +New pushes to master should trigger deploys, while pushes to other +branches should trigger just builds. diff --git a/backend/src/test-runner.ts b/backend/src/test-runner.ts index 95417cd..4a44de5 100644 --- a/backend/src/test-runner.ts +++ b/backend/src/test-runner.ts @@ -607,7 +607,7 @@ const testTypes: { format: { pred: ({ format }) => (format ? true : false), }, - lsp: { pred: ({ lsp }) => (lsp && lsp.code ? true : false) }, + lsp: { pred: ({ lsp }) => (lsp ? true : false) }, }; function getTestList() { diff --git a/packer/config-certbot.json b/packer/config-certbot.json deleted file mode 100644 index da7bc53..0000000 --- a/packer/config-certbot.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "variables": { - "api_token": "" - }, - "sensitive-variables": ["api_token"], - "builders": [ - { - "type": "digitalocean", - "api_token": "{{user `api_token`}}", - "image": "ubuntu-20-04-x64", - "region": "sfo3", - "size": "s-1vcpu-1gb", - "ssh_username": "root" - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision-certbot.bash" - } - ] -} diff --git a/packer/config.json b/packer/config.json index 8e86a28..768ccac 100644 --- a/packer/config.json +++ b/packer/config.json @@ -1,16 +1,16 @@ { "variables": { - "api_token": "", + "digitalocean_api_token": "", "admin_password": "", "admin_ssh_public_key_file": "", "deploy_ssh_public_key_file": "", "docker_repo": "raxod502/riju" }, - "sensitive-variables": ["api_token", "admin_password"], + "sensitive-variables": ["digitalocean_api_token", "admin_password"], "builders": [ { "type": "digitalocean", - "api_token": "{{user `api_token`}}", + "api_token": "{{user `digitalocean_api_token`}}", "image": "ubuntu-20-04-x64", "region": "sfo3", "size": "s-1vcpu-1gb", diff --git a/packer/provision-certbot.bash b/packer/provision-certbot.bash deleted file mode 100755 index 992665d..0000000 --- a/packer/provision-certbot.bash +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -export DEBIAN_FRONTEND=noninteractive -apt-get update -apt-get dist-upgrade -y - -apt-get install -y certbot - -rm -rf /var/lib/apt/lists/* diff --git a/packer/resources/certbot-post.bash b/packer/resources/certbot-post.bash index a151447..ed18ab4 100755 --- a/packer/resources/certbot-post.bash +++ b/packer/resources/certbot-post.bash @@ -1,6 +1,3 @@ #!/usr/bin/env bash -set -e -set -o pipefail - systemctl start riju diff --git a/packer/resources/certbot-pre.bash b/packer/resources/certbot-pre.bash index 5bd2098..ae175ae 100755 --- a/packer/resources/certbot-pre.bash +++ b/packer/resources/certbot-pre.bash @@ -1,6 +1,3 @@ #!/usr/bin/env bash -set -e -set -o pipefail - systemctl stop riju diff --git a/scripts/deploy.bash b/scripts/deploy.bash index b03b810..b9351c8 100755 --- a/scripts/deploy.bash +++ b/scripts/deploy.bash @@ -13,15 +13,16 @@ if [[ -z "${DOMAIN}" ]]; then fi if [[ -z "${DEPLOY_SSH_PRIVATE_KEY}" ]]; then - if [[ -f "$HOME/.ssh/id_rsa_riju_deploy" ]]; then - DEPLOY_SSH_PRIVATE_KEY="$(< "$HOME/.ssh/id_rsa_riju_deploy")" - else - echo "environment variable not set: DEPLOY_SSH_PRIVATE_KEY" - fi -else - DEPLOY_SSH_PRIVATE_KEY="$(printf '%s\n' "${DEPLOY_SSH_PRIVATE_KEY}" | base64 -d)" + echo "environment variable not set: DEPLOY_SSH_PRIVATE_KEY" >&2 + exit 1 fi +if [[ -f "${DEPLOY_SSH_PRIVATE_KEY}" ]]; then + DEPLOY_SSH_PRIVATE_KEY="$(< "${DEPLOY_SSH_PRIVATE_KEY}")" +fi + +DEPLOY_SSH_PRIVATE_KEY="$(printf '%s\n' "${DEPLOY_SSH_PRIVATE_KEY}" | base64 -d)" + tag="$(date +%s%3N)-$(git branch --show-current)-$(git rev-parse @)" if [[ -n "$(git status --porcelain)" ]]; then diff --git a/scripts/docker-install-phase1.bash b/scripts/docker-install-phase1.bash index 7f090ca..08a3745 100755 --- a/scripts/docker-install-phase1.bash +++ b/scripts/docker-install-phase1.bash @@ -23,7 +23,7 @@ curl -sSL https://keybase.io/crystal/pgp_keys.asc | apt-key add - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B4112585D386EB94 -wget -nv "https://packages.microsoft.com/config/ubuntu/${ubuntu_ver}/packages-microsoft-prod.deb" +wget "https://packages.microsoft.com/config/ubuntu/${ubuntu_ver}/packages-microsoft-prod.deb" dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb diff --git a/scripts/docker-install-phase3b.bash b/scripts/docker-install-phase3b.bash index 9dfe57a..7e408f6 100755 --- a/scripts/docker-install-phase3b.bash +++ b/scripts/docker-install-phase3b.bash @@ -104,7 +104,7 @@ ksh # Limbo gcc -libc6-dev-i386 +libc6-dev:i386 libx11-dev:i386 libxext-dev:i386 linux-libc-dev:i386 diff --git a/scripts/docker-install-phase4.bash b/scripts/docker-install-phase4.bash index 36c2e54..49d0217 100755 --- a/scripts/docker-install-phase4.bash +++ b/scripts/docker-install-phase4.bash @@ -11,23 +11,23 @@ latest_release() { # Needed for project infrastructure ver="$(latest_release watchexec/watchexec)" -wget -nv "https://github.com/watchexec/watchexec/releases/download/${ver}/watchexec-${ver}-x86_64-unknown-linux-gnu.deb" +wget "https://github.com/watchexec/watchexec/releases/download/${ver}/watchexec-${ver}-x86_64-unknown-linux-gnu.deb" dpkg -i watchexec-*.deb rm watchexec-*.deb # Shared ver="$(latest_release jgm/pandoc)" -wget -nv "https://github.com/jgm/pandoc/releases/download/${ver}/pandoc-${ver}-linux-amd64.tar.gz" +wget "https://github.com/jgm/pandoc/releases/download/${ver}/pandoc-${ver}-linux-amd64.tar.gz" tar -xf pandoc-*-linux-amd64.tar.gz -C /usr --strip-components=1 rm pandoc-*-linux-amd64.tar.gz # ><> -wget -nv https://gist.githubusercontent.com/anonymous/6392418/raw/fish.py -O /usr/local/bin/fish-lang +wget https://gist.githubusercontent.com/anonymous/6392418/raw/fish.py -O /usr/local/bin/fish-lang sed -i 's:^#!.*:#!/usr/bin/env python3:' /usr/local/bin/fish-lang chmod +x /usr/local/bin/fish-lang # ABC -wget -nv https://homepages.cwi.nl/~steven/abc/implementations/abc.tar.gz +wget https://homepages.cwi.nl/~steven/abc/implementations/abc.tar.gz mkdir /opt/abc tar -xf abc.tar.gz -C /opt/abc --strip-components=1 chmod +x /opt/abc/abc /opt/abc/abckeys @@ -40,7 +40,7 @@ chmod +x /usr/local/bin/abc rm abc.tar.gz # Ada -wget -nv https://dl.bintray.com/reznikmm/ada-language-server/linux-latest.tar.gz +wget https://dl.bintray.com/reznikmm/ada-language-server/linux-latest.tar.gz tar -xf linux-latest.tar.gz mv linux/ada_language_server /usr/local/bin/ada_language_server mv linux/*.so* /usr/lib/x86_64-linux-gnu/ @@ -48,26 +48,26 @@ rm -rf linux linux-latest.tar.gz # Ante mkdir /opt/ante -wget -nv https://github.com/raxod502/riju-cdn/releases/download/ante-0.8.0-d2c43992e0c7a4c1942d5c097233f4f7638a1ee6/ante -O /opt/ante/ante +wget https://github.com/raxod502/riju-cdn/releases/download/ante-0.8.0-d2c43992e0c7a4c1942d5c097233f4f7638a1ee6/ante -O /opt/ante/ante chmod +x /opt/ante/ante -wget -nv https://github.com/raxod502/riju-cdn/releases/download/ante-0.8.0-d2c43992e0c7a4c1942d5c097233f4f7638a1ee6/libantecommon.so -O /opt/ante/libantecommon.so +wget https://github.com/raxod502/riju-cdn/releases/download/ante-0.8.0-d2c43992e0c7a4c1942d5c097233f4f7638a1ee6/libantecommon.so -O /opt/ante/libantecommon.so ln -s /opt/ante/ante /usr/local/bin/ -wget -nv https://github.com/raxod502/riju-cdn/releases/download/ante-0.8.0-d2c43992e0c7a4c1942d5c097233f4f7638a1ee6/stdlib.tar.gz +wget https://github.com/raxod502/riju-cdn/releases/download/ante-0.8.0-d2c43992e0c7a4c1942d5c097233f4f7638a1ee6/stdlib.tar.gz tar -xf stdlib.tar.gz -C /opt/ante rm stdlib.tar.gz # Ante (Cards) -wget -nv https://github.com/michaeldv/ante/raw/master/ante.rb -O /usr/local/bin/ante-cards +wget https://github.com/michaeldv/ante/raw/master/ante.rb -O /usr/local/bin/ante-cards chmod +x /usr/local/bin/ante-cards # APL file="$(curl -sS ftp://ftp.gnu.org/gnu/apl/ | grep -Eo 'apl_[-0-9.]+_amd64.deb$' | sort -rV | head -n1)" -wget -nv "ftp://ftp.gnu.org/gnu/apl/${file}" +wget "ftp://ftp.gnu.org/gnu/apl/${file}" dpkg -i apl_*_amd64.deb rm apl_*_amd64.deb # Boo -wget -nv https://github.com/boo-lang/boo/releases/download/unstable/boo-latest.zip +wget https://github.com/boo-lang/boo/releases/download/unstable/boo-latest.zip unzip boo-latest.zip mv boo-latest /usr/local/lib/boo chmod +x /usr/local/lib/boo/booc /usr/local/lib/boo/booish @@ -75,19 +75,19 @@ ln -s /usr/local/lib/boo/booc /usr/local/lib/boo/booish /usr/local/bin/ # Clojure ver="$(latest_release snoe/clojure-lsp)" -wget -nv "https://github.com/snoe/clojure-lsp/releases/download/${ver}/clojure-lsp" +wget "https://github.com/snoe/clojure-lsp/releases/download/${ver}/clojure-lsp" chmod +x clojure-lsp mv clojure-lsp /usr/local/bin/clojure-lsp # D -wget -nv "$(curl -sSL https://dlang.org/download.html | grep -Eo '"http://[^"]+amd64.deb"' | tr -d '"')" +wget "$(curl -sSL https://dlang.org/download.html | grep -Eo '"http://[^"]+amd64.deb"' | tr -d '"')" dpkg -i dmd_*.deb rm dmd_*.deb # Dhall ver="$(latest_release dhall-lang/dhall-haskell)" file="$(curl -sSL "https://api.github.com/repos/dhall-lang/dhall-haskell/releases/tags/${ver}" | jq -r '.assets | map(select(.name | (contains("dhall-json") and contains("x86_64-linux.tar.bz2")))) | .[0].name')" -wget -nv "https://github.com/dhall-lang/dhall-haskell/releases/download/${ver}/${file}" +wget "https://github.com/dhall-lang/dhall-haskell/releases/download/${ver}/${file}" mkdir dhall-json tar -xf dhall-json-*-x86_64-linux.tar.bz2 -C dhall-json mv dhall-json/bin/dhall-to-json dhall-json/bin/json-to-dhall /usr/local/bin/ @@ -95,7 +95,7 @@ rm -rf dhall-json dhall-json-*-x86_64-linux.tar.bz2 # Dylan ver="$(latest_release dylan-lang/opendylan)" -wget -nv "https://github.com/dylan-lang/opendylan/releases/download/${ver}/opendylan-$(grep -Eo '[0-9]+\.[0-9]+' <<< "$ver")-x86_64-linux.tar.bz2" +wget "https://github.com/dylan-lang/opendylan/releases/download/${ver}/opendylan-$(grep -Eo '[0-9]+\.[0-9]+' <<< "$ver")-x86_64-linux.tar.bz2" tar -xf opendylan-*-x86_64-linux.tar.bz2 rm opendylan-*-x86_64-linux.tar.bz2 mv opendylan-* /opt/dylan @@ -103,21 +103,21 @@ ln -s /opt/dylan/bin/dylan-compiler /opt/dylan/bin/make-dylan-app /usr/local/bin # Elixir ver="$(latest_release elixir-lsp/elixir-ls)" -wget -nv "https://github.com/elixir-lsp/elixir-ls/releases/download/${ver}/elixir-ls.zip" +wget "https://github.com/elixir-lsp/elixir-ls/releases/download/${ver}/elixir-ls.zip" unzip -d /opt/elixir-ls elixir-ls.zip ln -s /opt/elixir-ls/language_server.sh /usr/local/bin/elixir-ls rm elixir-ls.zip # Elm ver="$(latest_release elm/compiler)" -wget -nv "https://github.com/elm/compiler/releases/download/${ver}/binary-for-linux-64-bit.gz" +wget "https://github.com/elm/compiler/releases/download/${ver}/binary-for-linux-64-bit.gz" gunzip binary-for-linux-64-bit.gz chmod +x binary-for-linux-64-bit mv binary-for-linux-64-bit /usr/local/bin/elm # Emojicode ver="$(latest_release emojicode/emojicode)" -wget -nv "https://github.com/emojicode/emojicode/releases/download/${ver}/Emojicode-$(sed 's/^v//' <<< "$ver")-Linux-x86_64.tar.gz" +wget "https://github.com/emojicode/emojicode/releases/download/${ver}/Emojicode-$(sed 's/^v//' <<< "$ver")-Linux-x86_64.tar.gz" tar -xf Emojicode-*-Linux-x86_64.tar.gz pushd Emojicode-*-Linux-x86_64 >/dev/null mv emojicodec /usr/local/bin/ @@ -129,24 +129,24 @@ popd >/dev/null rm -rf Emojicode-*-Linux-x86_64 Emojicode-*-Linux-x86_64.tar.gz # Entropy -wget -nv http://danieltemkin.com/Content/Entropy/Entropy.zip +wget http://danieltemkin.com/Content/Entropy/Entropy.zip unzip -d /opt/entropy Entropy.zip rm Entropy.zip # Erlang -wget -nv https://s3.amazonaws.com/rebar3/rebar3 +wget https://s3.amazonaws.com/rebar3/rebar3 chmod +x rebar3 mv rebar3 /usr/local/bin/rebar3 # Euphoria -wget -nv http://www.rapideuphoria.com/31/euphor31.tar +wget http://www.rapideuphoria.com/31/euphor31.tar mkdir /opt/euphoria tar -xf euphor*.tar -C /opt/euphoria --strip-components=1 ln -s /opt/euphoria/bin/exu /usr/bin/ rm euphor*.tar # Ezhil -wget -nv https://github.com/raxod502/riju-cdn/releases/download/ezhil-2017.08.19/ezhil.tar.gz +wget https://github.com/raxod502/riju-cdn/releases/download/ezhil-2017.08.19/ezhil.tar.gz tar -xf ezhil.tar.gz mv ezhil-* /opt/ezhil cp /opt/ezhil/ezhili /opt/ezhil/ezhuthi/ @@ -155,7 +155,7 @@ rm ezhil.tar.gz # Factor ver="$(curl -sSL https://factorcode.org/ | grep -Eo 'release\?os=linux[^>]+>[^<]+' | sed -E 's/[^>]+>//' | head -n1)" -wget -nv "https://downloads.factorcode.org/releases/${ver}/factor-linux-x86-64-${ver}.tar.gz" +wget "https://downloads.factorcode.org/releases/${ver}/factor-linux-x86-64-${ver}.tar.gz" tar -xf factor-linux-x86-64-*.tar.gz mv -T factor /opt/factor ln -s /opt/factor/factor /usr/local/bin/factor-lang @@ -175,68 +175,68 @@ mv go/bin/gopls /usr/local/bin/gopls rm -rf go # GolfScript -wget -nv http://www.golfscript.com/golfscript/golfscript.rb -O /usr/local/bin/golfscript +wget http://www.golfscript.com/golfscript/golfscript.rb -O /usr/local/bin/golfscript chmod +x /usr/local/bin/golfscript # Grass -wget -nv http://www.blue.sky.or.jp/grass/grass.rb -O /usr/local/bin/grass +wget http://www.blue.sky.or.jp/grass/grass.rb -O /usr/local/bin/grass chmod +x /usr/local/bin/grass # Haskell curl -sSL https://get.haskellstack.org/ | sh -wget -nv https://github.com/raxod502/riju-cdn/releases/download/brittany-0.12.1.1/brittany -O /usr/local/bin/brittany +wget https://github.com/raxod502/riju-cdn/releases/download/brittany-0.12.1.1/brittany -O /usr/local/bin/brittany chmod +x /usr/local/bin/brittany mkdir -p /opt/haskell -wget -nv https://github.com/raxod502/riju-cdn/releases/download/hie-1.4-a9005b2ba2050bdfdd4438f1d471a3f7985492cd-ghc8.6.5/hie -O /usr/local/bin/hie -wget -nv https://github.com/raxod502/riju-cdn/releases/download/hie-1.4-a9005b2ba2050bdfdd4438f1d471a3f7985492cd-ghc8.6.5/hoogle.hoo -O /opt/haskell/hoogle.hoo +wget https://github.com/raxod502/riju-cdn/releases/download/hie-1.4-a9005b2ba2050bdfdd4438f1d471a3f7985492cd-ghc8.6.5/hie -O /usr/local/bin/hie +wget https://github.com/raxod502/riju-cdn/releases/download/hie-1.4-a9005b2ba2050bdfdd4438f1d471a3f7985492cd-ghc8.6.5/hoogle.hoo -O /opt/haskell/hoogle.hoo chmod +x /usr/local/bin/hie # HCL/TOML/YAML ver="$(latest_release sclevine/yj)" -wget -nv "https://github.com/sclevine/yj/releases/download/${ver}/yj-linux" +wget "https://github.com/sclevine/yj/releases/download/${ver}/yj-linux" chmod +x yj-linux mv yj-linux /usr/local/bin/yj # HMMM -wget -nv https://www.cs.hmc.edu/~cs5grad/cs5/hmmm/code/hmmm -O /usr/local/bin/hmmm +wget https://www.cs.hmc.edu/~cs5grad/cs5/hmmm/code/hmmm -O /usr/local/bin/hmmm chmod +x /usr/local/bin/hmmm # Ink ver="$(latest_release thesephist/ink)" -wget -nv "https://github.com/thesephist/ink/releases/download/${ver}/ink-linux" -wget -nv "https://github.com/thesephist/ink/releases/download/${ver}/std.ink" -wget -nv "https://github.com/thesephist/ink/releases/download/${ver}/str.ink" +wget "https://github.com/thesephist/ink/releases/download/${ver}/ink-linux" +wget "https://github.com/thesephist/ink/releases/download/${ver}/std.ink" +wget "https://github.com/thesephist/ink/releases/download/${ver}/str.ink" chmod +x ink-linux mv ink-linux /usr/local/bin/ink mkdir /opt/ink mv std.ink str.ink /opt/ink/ # Ioke -wget -nv https://ioke.org/dist/ioke-ikj-latest.tar.gz +wget https://ioke.org/dist/ioke-ikj-latest.tar.gz tar -xf ioke-ikj-*.tar.gz -C /opt rm ioke-ikj-*.tar.gz ln -s /opt/ioke/bin/ioke /usr/local/bin/ioke # J -wget -nv "$(curl -sSL https://code.jsoftware.com/wiki/System/Installation/J901/Debian | grep -F '/dev/null # Clean -wget -nv "$(curl -sSL https://clean.cs.ru.nl/Download_Clean | grep linux/clean | grep -F 64.tar.gz | grep -Eo "https://[^>]+\.tar\.gz")" +wget "$(curl -sSL https://clean.cs.ru.nl/Download_Clean | grep linux/clean | grep -F 64.tar.gz | grep -Eo "https://[^>]+\.tar\.gz")" mkdir /opt/clean tar -xf clean*_64.tar.gz -C /opt/clean --strip-components=1 pushd /opt/clean >/dev/null @@ -67,7 +67,7 @@ rm -rf erlang_ls git clone https://github.com/m-ender/hexagony.git /opt/hexagony # Idris -wget -nv https://www.idris-lang.org/idris2-src/idris2-latest.tgz +wget https://www.idris-lang.org/idris2-src/idris2-latest.tgz tar -xf idris2-latest.tgz pushd Idris2-* >/dev/null make bootstrap-build SCHEME=chezscheme PREFIX=/usr/local @@ -95,7 +95,7 @@ popd >/dev/null rm -rf lazyk # Limbo -wget -nv "$(curl -sSL http://www.vitanuova.com/inferno/downloads.html | grep -E 'inferno-[0-9]+\.tgz' | grep -Eo 'http://[^"]+')" +wget "$(curl -sSL http://www.vitanuova.com/inferno/downloads.html | grep -E 'inferno-[0-9]+\.tgz' | grep -Eo 'http://[^"]+')" tar -xf inferno-*.tgz -C /usr/local pushd /usr/local/inferno >/dev/null sed -i 's/gcc/gcc -m32/g' makemk.sh @@ -119,7 +119,7 @@ rm -rf malbolge # Oberon file="$(curl -sSL https://miasap.se/obnc/ | grep -F obnc_ | grep -Eo 'obnc_[^"]+' | grep -v win | head -n1)" -wget -nv "https://miasap.se/obnc/downloads/${file}" +wget "https://miasap.se/obnc/downloads/${file}" tar -xf obnc_*.tar.gz pushd obnc-* >/dev/null ./build @@ -178,7 +178,7 @@ rm -rf slick # Snobol file="$(curl -sSL ftp://ftp.snobol4.org/snobol/ | grep -Eo 'snobol4-.*\.tar\.gz' | sort -rV | head -n1)" -wget -nv "ftp://ftp.snobol4.org/snobol/${file}" +wget "ftp://ftp.snobol4.org/snobol/${file}" tar -xf snobol4-*.tar.gz rm snobol4-*.tar.gz pushd snobol4-* >/dev/null @@ -197,7 +197,7 @@ popd >/dev/null # Tabloid mkdir /opt/tabloid pushd /opt/tabloid >/dev/null -wget -nv https://github.com/thesephist/tabloid/raw/master/static/js/lang.js +wget https://github.com/thesephist/tabloid/raw/master/static/js/lang.js cat <<"EOF" >> lang.js module.exports = { tokenize, Parser, Environment }; EOF @@ -214,7 +214,7 @@ popd >/dev/null rm -rf TECOC # Thue -wget -nv "$(curl -sSL https://catseye.tc/distribution/Thue_distribution | grep -Eo 'https://catseye.tc/distfiles/thue-[^"]+\.zip' | head -n1)" +wget "$(curl -sSL https://catseye.tc/distribution/Thue_distribution | grep -Eo 'https://catseye.tc/distfiles/thue-[^"]+\.zip' | head -n1)" unzip thue-*.zip rm thue-*.zip pushd thue-* >/dev/null @@ -224,7 +224,7 @@ popd >/dev/null rm -rf thue-* # Velato -wget -nv http://www.archduke.org/midi/asc2mid.c +wget http://www.archduke.org/midi/asc2mid.c clang asc2mid.c -o /usr/local/bin/asc2mid rm asc2mid.c