Skip to content

Instantly share code, notes, and snippets.

@esquinas
Created March 23, 2018 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esquinas/62fffbce3833af8d5d43dbe3531e1718 to your computer and use it in GitHub Desktop.
Save esquinas/62fffbce3833af8d5d43dbe3531e1718 to your computer and use it in GitHub Desktop.
C9.io Installation of the Red Language. +Info on "red-lang.org"
#!/usr/bin/env bash
# C9.io Installation of the Red Language. +Info on "red-lang.org".
## USAGE: `chmod +x ./install-red.sh && sudo ./install-red.sh`
REDLANG_PATH="/usr/local"
# For Linux 64-bit distros, you need to install 32-bit supporting libraries.
# So, for Debian-based distros, install them using:
dpkg --add-architecture i386
apt-get update
apt-get install libc6:i386 libcurl3:i386
# Download last stable Red binaries.
mkdir temp-install-red/
cd temp-install-red/
wget -O red https://static.red-lang.org/dl/linux/red-063
# Make Red globally available.
chmod u+x ./red
mkdir $REDLANG_PATH/
mkdir $REDLANG_PATH/bin/
mv -i ./red $REDLANG_PATH/bin/
c9 -v restart
source ~/.bashrc
rm -f ./red
whereis red
# Test by compiling a "hello world" script.
echo 'Red [Title: "Simple hello world script"]
print {
Hello World from Red!
Global installation successful.
}' > testred.red
red -c testred.red || sudo red -c testred.red
./testred || sudo ./testred
# Clean-up.
cd ..
rm -rf temp-install-red/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment