diff --git a/README.md b/README.md index 1d79039..e94c44a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ # ~/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 @@ -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 ├── README.md - You are here └── 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. \ No newline at end of file +``` \ No newline at end of file diff --git a/bash/.bashrc b/bash/.bashrc index 4a84e8e..cc15cef 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -117,7 +117,7 @@ if ! shopt -oq posix; then fi # 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`" export LIBGL_ALWAYS_INDIRECT=1 @@ -128,4 +128,5 @@ sudo /etc/init.d/dbus start &> /dev/null . "$HOME/.cargo/env" export EDITOR="micro" +export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 export DOTFILES_PATH=/home/reinaldy/.dotfiles diff --git a/debian.png b/debian.png new file mode 100644 index 0000000..1f11cb6 Binary files /dev/null and b/debian.png differ diff --git a/scripts/clojure.sh b/scripts/clojure.sh index 025e608..93f447e 100755 --- a/scripts/clojure.sh +++ b/scripts/clojure.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash function install () { - sudo ~ + cd ~ curl -O https://download.clojure.org/install/linux-install-1.10.3.943.sh chmod +x linux-install-1.10.3.943.sh sudo ./linux-install-1.10.3.943.sh @@ -13,6 +13,9 @@ function install () { sudo lein sudo rm linux-install-1.10.3.943.sh + + printf "\n\n" + clj --version } if [ "$1" == "install" ]; then diff --git a/scripts/git.sh b/scripts/git.sh index 214bf43..907123b 100755 --- a/scripts/git.sh +++ b/scripts/git.sh @@ -12,6 +12,8 @@ function install () { cd ~ sudo rm -rf git-${VERSION} sudo rm v${VERSION}.zip + printf "\n\n" + git --version } function setup () { diff --git a/scripts/go.sh b/scripts/go.sh index 64e573e..a46344b 100755 --- a/scripts/go.sh +++ b/scripts/go.sh @@ -1,17 +1,19 @@ #!/usr/bin/env bash -VERSION="1.16.7" +VERSION="1.17" function install () { echo "installing go" - sudo ~ + cd ~ wget https://golang.org/dl/go$VERSION.linux-amd64.tar.gz sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf 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 ln -s ${DOTFILES_PATH}/go/env $HOME/.config/go/env + printf "\n\n" + go version } function uninstall () { diff --git a/scripts/java.sh b/scripts/java.sh index bbf9ac1..8b2d752 100755 --- a/scripts/java.sh +++ b/scripts/java.sh @@ -13,8 +13,19 @@ function install () { 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 install +elif [ "$1" == "install_alt" ]; then + install_alt # elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then # uninstall else diff --git a/scripts/julia.sh b/scripts/julia.sh index fbf8093..27686f7 100755 --- a/scripts/julia.sh +++ b/scripts/julia.sh @@ -11,6 +11,8 @@ function install () { sudo mv julia-$VERSION julia sudo mv julia /opt/julia sudo rm julia-$VERSION-linux-x86_64.tar.gz + printf "\n\n" + julia --version } function uninstall () { diff --git a/scripts/lua.sh b/scripts/lua.sh index b439b0a..9d1b94a 100755 --- a/scripts/lua.sh +++ b/scripts/lua.sh @@ -7,11 +7,13 @@ function install () { wget https://www.lua.org/ftp/lua-$VERSION.tar.gz sudo tar zxf lua-$VERSION.tar.gz cd lua-$VERSION - make + sudo make sudo make install cd ~ sudo rm -rf lua-$VERSION sudo rm lua-$VERSION.tar.gz + printf "\n" + lua -v } function uninstall () { diff --git a/scripts/micro.sh b/scripts/micro.sh index df6eeb6..818f8a8 100755 --- a/scripts/micro.sh +++ b/scripts/micro.sh @@ -2,7 +2,7 @@ function install () { 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/bindings.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 filemanager micro -plugin install go - micro -plugin install wakatime + printf "\n\n" + micro -version } function uninstall () { - sudo rm /usr/bin/micro + sudo rm /opt/bin/micro } if [ "$1" == "install" ]; then diff --git a/scripts/node.sh b/scripts/node.sh index 71b9aff..d2f742f 100755 --- a/scripts/node.sh +++ b/scripts/node.sh @@ -4,6 +4,8 @@ function install () { echo "installing node js" curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell node-update + printf "\n\n" + node --version } function uninstall () { diff --git a/scripts/python.sh b/scripts/python.sh index 2acf982..c27e72a 100755 --- a/scripts/python.sh +++ b/scripts/python.sh @@ -22,8 +22,9 @@ function install () { sudo rm Python-$VERSION.tgz sudo rm -rf Python-$VERSION sudo rm get-pip.py - - /opt/python/${VERSION}/bin/python3 --version + + printf "\n\n" + python3 --version } if [ "$1" == "install" ]; then diff --git a/scripts/rust.sh b/scripts/rust.sh index eba3741..53b8d6c 100755 --- a/scripts/rust.sh +++ b/scripts/rust.sh @@ -2,6 +2,9 @@ function install () { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + printf "\n\n" + rustc --version + cargo --version } function uninstall () { diff --git a/scripts/utils.sh b/scripts/utils.sh index 73d792d..2e370ba 100755 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -5,9 +5,11 @@ function install_exa () { cd ~ 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 - 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 -rf exa + printf "\n\n" + exa --version } 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 sudo dpkg -i bat_0.18.2_amd64.deb sudo rm bat_${BAT_VERSION}_amd64.deb + sudo mv /usr/bin/bat /opt/bin + printf "\n\n" + bat --version } function install_curlie () { @@ -23,7 +28,7 @@ function install_curlie () { cd ~ 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 mv curlie /usr/local/bin/ + sudo mv curlie /opt/bin 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 rm $NEOFETCH_VERSION.tar.gz 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 @@ -56,6 +83,8 @@ if [ "$1" == "install" ]; then install_bat install_curlie install_neofetch + install_fd + install_fzf fi elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then uninstall diff --git a/setup.sh b/setup.sh index 505ffd4..ca3cc53 100755 --- a/setup.sh +++ b/setup.sh @@ -28,6 +28,7 @@ function set_symlink () { sudo chmod -R 755 ./scripts sudo chmod -R 755 ./bin +sudo mkdir /opt/bin if [[ $(cat /etc/issue) = *"Ubuntu"* ]]; then sudo apt update @@ -57,6 +58,8 @@ fi ./scripts/rust.sh install +./scripts/java.sh install_alt + ./scripts/micro.sh install ./scripts/utils.sh install