From 906fa6be6f9fc6dc0921c86a940fab77cd1170d0 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Wed, 28 Jul 2021 02:12:03 +0700 Subject: [PATCH] update small typo --- scripts/go.sh | 2 ++ scripts/utils.sh | 1 + setup.sh | 25 ++++++++++++++++--------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/scripts/go.sh b/scripts/go.sh index e931421..9322f77 100755 --- a/scripts/go.sh +++ b/scripts/go.sh @@ -8,6 +8,8 @@ function install () { sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz rm go$VERSION.linux-amd64.tar.gz + sudo rm $HOME/.config/go/env + ln -s $HOME/dotfiles/go/env $HOME/.config/go/env } function uninstall () { diff --git a/scripts/utils.sh b/scripts/utils.sh index bb825a2..2f65a72 100755 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -18,6 +18,7 @@ function install_bat () { if [ "$1" == "install" ]; then install_exa + install_bat elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then uninstall else diff --git a/setup.sh b/setup.sh index b95a828..2155d2c 100755 --- a/setup.sh +++ b/setup.sh @@ -1,21 +1,28 @@ #!/bin/bash ME="/home/$(whoami)" -CFG="$(ME)/.config" -DOTFILES="$(ME)/dotfiles" -BINDIR="$(ME)/dotfiles/bin" +CFG="${ME}/.config" +DOTFILES="${ME}/dotfiles" +BINDIR="${ME}/dotfiles/bin" echo "I'm assuming you're doing a fresh install. Send a SIGTERM anytime you like." -sudo apt get -y +sudo apt install -y curl wget openssl tar unzip git + +sudo chmod -R 755 ./scripts if test ! $(which fnm); then - echo "Installing fnm" - /bin/sh curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell - $(ME)/.fnm/fnm fnm install lts + ./scripts/node.sh install fi if test ! $(which go); then - echo "Installing go" - /bin/sh wget https://golang.org/dl/go1.16.6.linux-amd64.tar.gz + ./scripts/go.sh install +fi + +if test ! $(which julia); then + ./scripts/julia.sh install +fi + +if test ! $(which nvim); then + ./scripts/neovim.sh install fi \ No newline at end of file