Created
March 23, 2018 18:19
-
-
Save esquinas/62fffbce3833af8d5d43dbe3531e1718 to your computer and use it in GitHub Desktop.
C9.io Installation of the Red Language. +Info on "red-lang.org"
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 | |
# 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