Last active
February 27, 2021 10:52
-
-
Save cholnhial/4c32f84007ee3c9cc90db1542e5cdc09 to your computer and use it in GitHub Desktop.
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
printf "Downloading Node 10...\n" | |
wget "https://nodejs.org/download/release/latest-v10.x/node-v10.24.0-linux-x64.tar.gz" -O /tmp/node10.tar.gz &> /dev/null | |
printf "Extracting Node 10...\n" | |
mkdir ~/.software | |
tar -xf /tmp/node10.tar.gz -C ~/.software &> /dev/null | |
printf "Configuring SHELL...\n" | |
if test -f ~/.bashrc; then | |
printf "Found bash configuring bash...\n" | |
echo 'export NODEJS_HOME=~/.software/node-v10.24.0-linux-x64' >> ~/.bashrc | |
echo 'export PATH=$NODEJS_HOME/bin:$PATH' >> ~/.bashrc | |
printf "Reloading profile...\n" | |
source ~/.bashrc &> /dev/null | |
fi | |
if test -f ~/.zshrc; then | |
printf "Found ZSH, configuring ZSH...\n" | |
echo 'export NODEJS_HOME=~/.software/node-v10.24.0-linux-x64' >> ~/.zshrc | |
echo 'export PATH=$NODEJS_HOME/bin:$PATH' >> ~/.zshrc | |
printf "Reloading profile...\n" | |
source ~/.zshrc &> /dev/null | |
fi | |
printf "Installing tldr...\n" | |
npm install -g tldr &> /dev/null | |
mkdir -p ~/.tldr/cache &> /dev/null | |
printf "Downloading pages...\n" | |
wget "https://tldr-pages.github.io/assets/tldr.zip" -O /tmp/tldr.zip &> /dev/null | |
printf "Extracting pages...\n" | |
unzip /tmp/tldr.zip -d ~/.tldr/cache &> /dev/null | |
printf "Cleaning up...\n" | |
rm /tmp/node10.tar.gz &> /dev/null | |
rm /tmp/tldr.zip &> /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment