installation scripts again

This commit is contained in:
Reinaldy Rafli 2021-08-17 12:08:52 +07:00
parent ff09435cd2
commit 466c89702c
15 changed files with 84 additions and 19 deletions

View File

@ -1,6 +1,13 @@
# ~/dotfiles # ~/dotfiles
This is here in case anything goes wrong. I'm using WSL2 (Windows on Linux), so no window manager or something like that. This is here in case anything goes wrong. I'm using WSL2 (Windows Subsystem Linux), so no window manager or something like that.
I'm not licensing it. If you want to steal a script or two, that's totally fine, even without asking my permission.
Use [issues](https://github.com/aldy505/dotfiles/issues) for any questions.
Debian (I used to use Ubuntu)
![](./debian.png)
### Directory structure ### Directory structure
@ -18,8 +25,4 @@ This is here in case anything goes wrong. I'm using WSL2 (Windows on Linux), so
├── me.jpg - My Github profile picture ├── me.jpg - My Github profile picture
├── README.md - You are here ├── README.md - You are here
└── setup.sh - Entrypoint if I'm doing a fresh install └── setup.sh - Entrypoint if I'm doing a fresh install
``` ```
I'm not licensing it. If you want to steal a script or two, that's totally fine, even without asking my permission.
Use [issues](https://github.com/aldy505/dotfiles/issues) for any questions.

View File

@ -117,7 +117,7 @@ if ! shopt -oq posix; then
fi fi
# fnm # fnm
export PATH=$ME/.fnm:/opt/julia/bin:/opt/python/3.9.6/bin:/opt/java/bin:$ME/.fly/bin:$ME/go/bin:$DOTFILES_PATH/bin:$PATH export PATH=$ME/.fnm:/opt/julia/bin:/opt/python/3.9.6/bin:/usr/lib/jvm/java-11-openjdk-amd64/bin:/opt/bin:$ME/.fly/bin:$ME/go/bin:$DOTFILES_PATH/bin:$PATH
eval "`fnm env`" eval "`fnm env`"
export LIBGL_ALWAYS_INDIRECT=1 export LIBGL_ALWAYS_INDIRECT=1
@ -128,4 +128,5 @@ sudo /etc/init.d/dbus start &> /dev/null
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
export EDITOR="micro" export EDITOR="micro"
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export DOTFILES_PATH=/home/reinaldy/.dotfiles export DOTFILES_PATH=/home/reinaldy/.dotfiles

BIN
debian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
function install () { function install () {
sudo ~ cd ~
curl -O https://download.clojure.org/install/linux-install-1.10.3.943.sh curl -O https://download.clojure.org/install/linux-install-1.10.3.943.sh
chmod +x linux-install-1.10.3.943.sh chmod +x linux-install-1.10.3.943.sh
sudo ./linux-install-1.10.3.943.sh sudo ./linux-install-1.10.3.943.sh
@ -13,6 +13,9 @@ function install () {
sudo lein sudo lein
sudo rm linux-install-1.10.3.943.sh sudo rm linux-install-1.10.3.943.sh
printf "\n\n"
clj --version
} }
if [ "$1" == "install" ]; then if [ "$1" == "install" ]; then

View File

@ -12,6 +12,8 @@ function install () {
cd ~ cd ~
sudo rm -rf git-${VERSION} sudo rm -rf git-${VERSION}
sudo rm v${VERSION}.zip sudo rm v${VERSION}.zip
printf "\n\n"
git --version
} }
function setup () { function setup () {

View File

@ -1,17 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
VERSION="1.16.7" VERSION="1.17"
function install () { function install () {
echo "installing go" echo "installing go"
sudo ~ cd ~
wget https://golang.org/dl/go$VERSION.linux-amd64.tar.gz wget https://golang.org/dl/go$VERSION.linux-amd64.tar.gz
sudo rm -rf /usr/local/go sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz
sudo rm go$VERSION.linux-amd64.tar.gz sudo rm go$VERSION.linux-amd64.tar.gz
sudo rm $HOME/.config/go sudo rm -rf $HOME/.config/go
sudo mkdir $HOME/.config/go sudo mkdir $HOME/.config/go
sudo ln -s ${DOTFILES_PATH}/go/env $HOME/.config/go/env sudo ln -s ${DOTFILES_PATH}/go/env $HOME/.config/go/env
printf "\n\n"
go version
} }
function uninstall () { function uninstall () {

View File

@ -13,8 +13,19 @@ function install () {
sudo rm openjdk-${VERSION}_linux-x64_bin.tar.gz.sha256 sudo rm openjdk-${VERSION}_linux-x64_bin.tar.gz.sha256
} }
function install_alt () {
cd ~
sudo apt-get install openjdk-11-jre openjdk-11-jdk
printf "\n\n"
java --version
printf "\n"
javac --version
}
if [ "$1" == "install" ]; then if [ "$1" == "install" ]; then
install install
elif [ "$1" == "install_alt" ]; then
install_alt
# elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then # elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then
# uninstall # uninstall
else else

View File

@ -11,6 +11,8 @@ function install () {
sudo mv julia-$VERSION julia sudo mv julia-$VERSION julia
sudo mv julia /opt/julia sudo mv julia /opt/julia
sudo rm julia-$VERSION-linux-x86_64.tar.gz sudo rm julia-$VERSION-linux-x86_64.tar.gz
printf "\n\n"
julia --version
} }
function uninstall () { function uninstall () {

View File

@ -7,11 +7,13 @@ function install () {
wget https://www.lua.org/ftp/lua-$VERSION.tar.gz wget https://www.lua.org/ftp/lua-$VERSION.tar.gz
sudo tar zxf lua-$VERSION.tar.gz sudo tar zxf lua-$VERSION.tar.gz
cd lua-$VERSION cd lua-$VERSION
make sudo make
sudo make install sudo make install
cd ~ cd ~
sudo rm -rf lua-$VERSION sudo rm -rf lua-$VERSION
sudo rm lua-$VERSION.tar.gz sudo rm lua-$VERSION.tar.gz
printf "\n"
lua -v
} }
function uninstall () { function uninstall () {

View File

@ -2,7 +2,7 @@
function install () { function install () {
curl https://getmic.ro | bash curl https://getmic.ro | bash
sudo mv micro /usr/bin sudo mv micro /opt/bin
sudo rm $HOME/.config/micro/settings.json sudo rm $HOME/.config/micro/settings.json
sudo rm $HOME/.config/micro/bindings.json sudo rm $HOME/.config/micro/bindings.json
sudo ln -s ${DOTFILES_PATH}/micro/settings.json $HOME/.config/micro/settings.json sudo ln -s ${DOTFILES_PATH}/micro/settings.json $HOME/.config/micro/settings.json
@ -13,11 +13,12 @@ function install () {
micro -plugin install editorconfig micro -plugin install editorconfig
micro -plugin install filemanager micro -plugin install filemanager
micro -plugin install go micro -plugin install go
micro -plugin install wakatime printf "\n\n"
micro -version
} }
function uninstall () { function uninstall () {
sudo rm /usr/bin/micro sudo rm /opt/bin/micro
} }
if [ "$1" == "install" ]; then if [ "$1" == "install" ]; then

View File

@ -4,6 +4,8 @@ function install () {
echo "installing node js" echo "installing node js"
curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell
node-update node-update
printf "\n\n"
node --version
} }
function uninstall () { function uninstall () {

View File

@ -22,8 +22,9 @@ function install () {
sudo rm Python-$VERSION.tgz sudo rm Python-$VERSION.tgz
sudo rm -rf Python-$VERSION sudo rm -rf Python-$VERSION
sudo rm get-pip.py sudo rm get-pip.py
/opt/python/${VERSION}/bin/python3 --version printf "\n\n"
python3 --version
} }
if [ "$1" == "install" ]; then if [ "$1" == "install" ]; then

View File

@ -2,6 +2,9 @@
function install () { function install () {
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
printf "\n\n"
rustc --version
cargo --version
} }
function uninstall () { function uninstall () {

View File

@ -5,9 +5,11 @@ function install_exa () {
cd ~ cd ~
wget https://github.com/ogham/exa/releases/download/v$EXA_VERSION/exa-linux-x86_64-v$EXA_VERSION.zip wget https://github.com/ogham/exa/releases/download/v$EXA_VERSION/exa-linux-x86_64-v$EXA_VERSION.zip
unzip exa-linux-x86_64-v$EXA_VERSION.zip -d exa unzip exa-linux-x86_64-v$EXA_VERSION.zip -d exa
sudo mv exa/bin/exa /usr/local/bin/exa sudo mv exa/bin/exa /opt/bin
sudo rm exa-linux-x86_64-v$EXA_VERSION.zip sudo rm exa-linux-x86_64-v$EXA_VERSION.zip
sudo rm -rf exa sudo rm -rf exa
printf "\n\n"
exa --version
} }
function install_bat () { function install_bat () {
@ -16,6 +18,9 @@ function install_bat () {
wget https://github.com/sharkdp/bat/releases/download/v${BAT_VERSION}/bat_${BAT_VERSION}_amd64.deb wget https://github.com/sharkdp/bat/releases/download/v${BAT_VERSION}/bat_${BAT_VERSION}_amd64.deb
sudo dpkg -i bat_0.18.2_amd64.deb sudo dpkg -i bat_0.18.2_amd64.deb
sudo rm bat_${BAT_VERSION}_amd64.deb sudo rm bat_${BAT_VERSION}_amd64.deb
sudo mv /usr/bin/bat /opt/bin
printf "\n\n"
bat --version
} }
function install_curlie () { function install_curlie () {
@ -23,7 +28,7 @@ function install_curlie () {
cd ~ cd ~
wget https://github.com/rs/curlie/releases/download/v${CURLIE_VERSION}/curlie_${CURLIE_VERSION}_linux_amd64.tar.gz wget https://github.com/rs/curlie/releases/download/v${CURLIE_VERSION}/curlie_${CURLIE_VERSION}_linux_amd64.tar.gz
sudo tar -zxvf curlie_${CURLIE_VERSION}_linux_amd64.tar.gz curlie sudo tar -zxvf curlie_${CURLIE_VERSION}_linux_amd64.tar.gz curlie
sudo mv curlie /usr/local/bin/ sudo mv curlie /opt/bin
sudo rm curlie_${CURLIE_VERSION}_linux_amd64.tar.gz sudo rm curlie_${CURLIE_VERSION}_linux_amd64.tar.gz
} }
@ -40,6 +45,28 @@ function install_neofetch () {
sudo ln -s ${DOTFILES_PATH}/neofetch/config.conf $HOME/.config/neofetch/config.conf sudo ln -s ${DOTFILES_PATH}/neofetch/config.conf $HOME/.config/neofetch/config.conf
sudo rm $NEOFETCH_VERSION.tar.gz sudo rm $NEOFETCH_VERSION.tar.gz
sudo rm -rf neofetch-$NEOFETCH_VERSION sudo rm -rf neofetch-$NEOFETCH_VERSION
printf "\n\n"
neofetch --version
}
function install_fd () {
FD_VERSION="8.2.1"
cd ~
wget https://github.com/sharkdp/fd/releases/download/v${FD_VERSION}/fd_${FD_VERSION}_amd64.deb
sudo dpkg -i fd_${FD_VERSION}_amd64.deb
sudo rm fd_${FD_VERSION}_amd64.deb
sudo mv /usr/bin/fd /opt/bin
printf "\n\n"
fd --version
}
function install_fzf () {
FZF_VERSION="0.27.2"
cd ~
wget https://github.com/junegunn/fzf/releases/download/${FZF_VERSION}/fzf-${FZF_VERSION}-linux_amd64.tar.gz
sudo tar -zxvf fzf-${FZF_VERSION}-linux_amd64.tar.gz
sudo mv fzf /opt/bin
sudo rm fzf-${FZF_VERSION}-linux_amd64.tar.gz
} }
if [ "$1" == "install" ]; then if [ "$1" == "install" ]; then
@ -56,6 +83,8 @@ if [ "$1" == "install" ]; then
install_bat install_bat
install_curlie install_curlie
install_neofetch install_neofetch
install_fd
install_fzf
fi fi
elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then
uninstall uninstall

View File

@ -28,6 +28,7 @@ function set_symlink () {
sudo chmod -R 755 ./scripts sudo chmod -R 755 ./scripts
sudo chmod -R 755 ./bin sudo chmod -R 755 ./bin
sudo mkdir /opt/bin
if [[ $(cat /etc/issue) = *"Ubuntu"* ]]; then if [[ $(cat /etc/issue) = *"Ubuntu"* ]]; then
sudo apt update sudo apt update
@ -57,6 +58,8 @@ fi
./scripts/rust.sh install ./scripts/rust.sh install
./scripts/java.sh install_alt
./scripts/micro.sh install ./scripts/micro.sh install
./scripts/utils.sh install ./scripts/utils.sh install