Skip to content

Instantly share code, notes, and snippets.

@yxqsnz
Created May 3, 2021 12:11
Show Gist options
  • Save yxqsnz/5375f128b931598a3020cee10fda1e2a to your computer and use it in GitHub Desktop.
Save yxqsnz/5375f128b931598a3020cee10fda1e2a to your computer and use it in GitHub Desktop.
Script that installs tools and languages that I use.
#! /bin/bash
declare -a to_install=(
'base-devel'
'fontconfig'
'imagemagick'
'git'
'vim'
'openssl'
'ncurses'
'ctags'
'curl'
'ack'
'vim'
'zsh'
'docker'
);
for x in ${to_install[*]}; do
echo "+ Installing ${x}";
sudo pamac install ${x} --no-confirm;
done
echo "# Installing asdf and tools...";
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0 # install ASDF
. $HOME/.asdf/asdf.sh
echo '. $HOME/.asdf/asdf.sh' >> ~/.zshrc
# install plugins.
echo ' + Adding golang support...';
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git;
echo ' + adding java support...';
asdf plugin-add java https://github.com/halcyon/asdf-java.git;
echo ' + adding kotlin support...';
asdf plugin-add kotlin https://github.com/asdf-community/asdf-kotlin.git;
echo ' + adding NodeJs support...'
asdf plugin-add nodejs;
echo ' + adding Ruby support...';
asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
echo "# Fetching versions...";
NODE_VERSION=`asdf latest nodejs`;
JAVA_VERSION=`echo 'openjdk-15'`;
GO_VERSION=`asdf latest golang`;
KT_VERSION=`asdf latest kotlin`;
RUBY_VERSION=`asdf latest ruby`;
echo " + Done";
echo "# Installing langs";
echo " + Installing Java v15"
asdf install java $JAVA_VERSION;
asdf global java $JAVA_VERSION;
echo " + Installing Go v${GO_VERSION}"
asdf install golang ${GO_VERSION};
asdf global golang $GO_VERSION;
echo " + Installing Kotlin v${KT_VERSION}";
asdf install kotlin $KT_VERSION;
asdf global kotlin $KT_VERSION
echo " + Installing Nodejs v${NODE_VERSION}";
asdf install nodejs $NODE_VERSION;
asdf global nodejs $NODE_VERSION;
echo " + Installing Ruby v${RUBY_VERSION}";
asdf install ruby $RUBY_VERSION;
asdf global ruby $RUBY_VERSION;
echo 'done.'
echo "You are ready to Code. (:"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment