Skip to content

Instantly share code, notes, and snippets.

@sachin21
Last active April 19, 2023 06:28
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 sachin21/eecd241ecf420323fe388de155a02658 to your computer and use it in GitHub Desktop.
Save sachin21/eecd241ecf420323fe388de155a02658 to your computer and use it in GitHub Desktop.
Programming Language Installers
#!/usr/bin/env bash
set -e
for TARGET_VERSION in $@; do
if MAKE_OPTS="-j $(nproc)" MAKEOPTS="-j $(nproc)" nodenv install $TARGET_VERSION && nodenv global $TARGET_VERSION; then
npm install --global npm@latest
npm install --global neovim
npm install --global js-beautify
npm rehash
echo "nodejs $TARGET_VERSION was successfully installed"
else
echo "[Error] nodejs $TARGET_VERSION is unsuccessfully installed"
fi
done
#!/usr/bin/env bash
set -e
for TARGET_VERSION in $@; do
if MAKE_OPTS="-j $(nproc)" MAKEOPTS="-j $(nproc)" pyenv install $TARGET_VERSION; then
pyenv global $TARGET_VERSION
pip install wheel
pip install neovim
echo "python $TARGET_VERSION is successfully installed"
else
echo "[Error] python $TARGET_VERSION is unsuccessfully installed"
fi
done
#!/usr/bin/env bash
set -e
for TARGET_VERSION in $@; do
command="rbenv install $TARGET_VERSION"
if MAKE_OPTS="-j $(nproc)" MAKEOPTS="-j $(nproc)" eval $command && rbenv global $TARGET_VERSION; then
gem install awesome_print
gem install bundler
gem install css2sass
gem install html2haml
gem install js2coffee
gem install neovim
gem install pry
gem install pry-byebug
gem install pry-doc
gem install ripper-tags
gem install space2dash
gem install space2dot
gem install space2underscore
rbenv rehash
echo "Ruby $TARGET_VERSION was successfully installed"
else
echo "[Error] Ruby $TARGET_VERSION is unsuccessfully installed"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment