From e106eda01bd07282704f63e9b697c2e2b6272118 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Wed, 24 Nov 2021 21:14:39 +0700 Subject: [PATCH] lots and lots of things --- bash/.bashrc | 11 ++++++++++- bin/gitlogpro | 8 +++++++- bin/node-update | 7 +------ git/.gitconfig | 35 +++++++++++++++++++---------------- scripts/git.sh | 8 ++++++-- scripts/go.sh | 14 +++++++------- scripts/janet.sh | 27 +++++++++++++++++++++++++++ scripts/java.sh | 2 +- scripts/julia.sh | 10 +++++----- scripts/lua.sh | 12 ++++++------ scripts/neovim.sh | 4 ++-- scripts/python.sh | 10 +++++----- 12 files changed, 96 insertions(+), 52 deletions(-) create mode 100644 scripts/janet.sh diff --git a/bash/.bashrc b/bash/.bashrc index 928db00..f5751b1 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -118,7 +118,9 @@ if ! shopt -oq posix; then fi # fnm -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 +PATH=$DOTFILES_PATH/bin:$ME/.local/kitty.app/bin/kitty:$PATH +PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:/opt/bin:$ME/.fly/bin:$ME/go/bin:$PATH +export PATH=$ME/.fnm:/opt/julia/bin:/opt/janet/bin:/opt/python/3.9.6/bin:/opt:/opt/zig:$PATH eval "`fnm env`" export LIBGL_ALWAYS_INDIRECT=1 @@ -142,3 +144,10 @@ export COLORTERM="truecolor" export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 export DOTFILES_PATH=/home/reinaldy/.dotfiles eval "$(starship init bash)" + +#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! +export SDKMAN_DIR="$HOME/.sdkman" +[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" + +BUN_INSTALL="/home/reinaldy/.bun" +PATH="$BUN_INSTALL/bin:$PATH" diff --git a/bin/gitlogpro b/bin/gitlogpro index 10800dd..005b552 100755 --- a/bin/gitlogpro +++ b/bin/gitlogpro @@ -1,3 +1,9 @@ #!/usr/bin/env bash -git log --color --decorate --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit +git log \ + --color \ + --decorate \ + --all \ + --graph \ + --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \ + --abbrev-commit diff --git a/bin/node-update b/bin/node-update index e19a8b3..f1e875f 100755 --- a/bin/node-update +++ b/bin/node-update @@ -1,12 +1,7 @@ #!/usr/bin/env bash -fnm uninstall 14 fnm uninstall 16 -fnm install 14 -fnm use 14 -npm install -g yarn tldr pnpm npm-check-updates np node-gyp commitizen - fnm install 16 fnm use 16 -npm install -g yarn tldr pnpm npm-check-updates np node-gyp commitizen +npm install -g pnpm npm-check-updates node-gyp commitizen diff --git a/git/.gitconfig b/git/.gitconfig index 7864e6f..05c777a 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -1,16 +1,19 @@ -[user] - name = Reinaldy Rafli - email = aldy505@tutanota.com - signingkey = CFDB9400255D8CB6 -[core] - editor = code -[color] - status = auto - branch = auto - interactive = auto -[gpg] - program = gpg -[init] - defaultBranch = master -[commit] - gpgsign = false +[includeIf "gitdir:~/repository/kawanlama/"] + path = ~/repository/kawanlama/.gitconfig +[includeIf "gitdir:~/repository/personal/"] + path = ~/repository/.gitconfig +[includeIf "gitdir:~/repository/oss/"] + path = ~/repository/.gitconfig +[includeIf "gitdir:~/repository/teknologi-umum/"] + path = ~/repository/.gitconfig +[includeIf "gitdir:~/repository/databases/"] + path = ~/repository/.gitconfig +[includeIf "gitdir:~/repository/arcet/"] + path = ~/repository/.gitconfig +[includeIf "gitdir:~/repository/tridots-lms/"] + path = ~/repository/.gitconfig +[includeIf "gitdir:~/repository/reinaldyrfl/"] + path = ~/repository/.gitconfig +[includeIf "gitdir:~/.dotfiles/"] + path = ~/repository/.gitconfig + diff --git a/scripts/git.sh b/scripts/git.sh index 907123b..a7e2799 100755 --- a/scripts/git.sh +++ b/scripts/git.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERSION="2.32.0" +VERSION="2.34.0" function install () { cd ~ @@ -16,6 +16,10 @@ function install () { git --version } +function uninstall () { + sudo rm /usr/local/bin/git +} + function setup () { echo "create a ssh key" echo "gimme your email: " @@ -43,4 +47,4 @@ elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then uninstall else echo "please specify args with install or uninstall" -fi \ No newline at end of file +fi diff --git a/scripts/go.sh b/scripts/go.sh index a46344b..2a54707 100755 --- a/scripts/go.sh +++ b/scripts/go.sh @@ -1,17 +1,17 @@ #!/usr/bin/env bash -VERSION="1.17" +VERSION="1.17.3" function install () { echo "installing go" 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 tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz - sudo rm go$VERSION.linux-amd64.tar.gz - sudo rm -rf $HOME/.config/go - sudo mkdir $HOME/.config/go - sudo ln -s ${DOTFILES_PATH}/go/env $HOME/.config/go/env + sudo tar -C /usr/local -xzf go${VERSION}.linux-amd64.tar.gz + sudo rm go${VERSION}.linux-amd64.tar.gz + 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 } diff --git a/scripts/janet.sh b/scripts/janet.sh new file mode 100644 index 0000000..e550ede --- /dev/null +++ b/scripts/janet.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +VERSION="1.18.1" + +function install () { + cd ~ + wget https://github.com/janet-lang/janet/releases/download/v${VERSION}/janet-v${VERSION}-linux-x64.tar.gz + tar zxvf janet-v${VERSION}-linux-x64.tar.gz + sudo mv janet-v${VERSION}-linux janet + sudo mv janet /opt/janet + sudo rm janet-v${VERSION}-linux-x64.tar.gz + + git clone --depth=1 https://github.com/janet-lang/jpm.git + cd jpm + sudo janet bootstrap.janet + + printf "\n\n" + janet --version +} + +if [ "$1" == "install" ]; then + install +elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then + uninstall +else + echo "please specify args with install or uninstall" +fi diff --git a/scripts/java.sh b/scripts/java.sh index 8b2d752..748861a 100755 --- a/scripts/java.sh +++ b/scripts/java.sh @@ -8,7 +8,7 @@ function install () { wget https://download.java.net/java/GA/jdk${VERSION}/d4a915d82b4c4fbb9bde534da945d746/7/GPL/openjdk-${VERSION}_linux-x64_bin.tar.gz.sha256 sha256sum openjdk-${VERSION}_linux-x64_bin.tar.gz sudo tar xvf openjdk-${VERSION}_linux-x64_bin.tar.gz - sudo mv jdk-$VERSION /opt/java + sudo mv jdk-${VERSION} /opt/java sudo rm openjdk-${VERSION}_linux-x64_bin.tar.gz sudo rm openjdk-${VERSION}_linux-x64_bin.tar.gz.sha256 } diff --git a/scripts/julia.sh b/scripts/julia.sh index 27686f7..c9532e6 100755 --- a/scripts/julia.sh +++ b/scripts/julia.sh @@ -1,16 +1,16 @@ #!/usr/bin/env bash MINOR="1.6" -VERSION="1.6.2" +VERSION="1.6.3" function install () { echo "installing julia" cd ~ - wget https://julialang-s3.julialang.org/bin/linux/x64/$MINOR/julia-$VERSION-linux-x86_64.tar.gz - tar zxvf julia-$VERSION-linux-x86_64.tar.gz - sudo mv julia-$VERSION julia + wget https://julialang-s3.julialang.org/bin/linux/x64/${MINOR}/julia-${VERSION}-linux-x86_64.tar.gz + tar zxvf julia-${VERSION}-linux-x86_64.tar.gz + sudo mv julia-${VERSION} 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 } diff --git a/scripts/lua.sh b/scripts/lua.sh index 9d1b94a..4eed210 100755 --- a/scripts/lua.sh +++ b/scripts/lua.sh @@ -4,14 +4,14 @@ VERSION="5.4.3" function install () { cd ~ - wget https://www.lua.org/ftp/lua-$VERSION.tar.gz - sudo tar zxf lua-$VERSION.tar.gz - cd lua-$VERSION + wget https://www.lua.org/ftp/lua-${VERSION}.tar.gz + sudo tar zxf lua-${VERSION}.tar.gz + cd lua-${VERSION} sudo make sudo make install cd ~ - sudo rm -rf lua-$VERSION - sudo rm lua-$VERSION.tar.gz + sudo rm -rf lua-${VERSION} + sudo rm lua-${VERSION}.tar.gz printf "\n" lua -v } @@ -27,4 +27,4 @@ elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then uninstall else echo "please specify args with install or uninstall" -fi \ No newline at end of file +fi diff --git a/scripts/neovim.sh b/scripts/neovim.sh index 0e1e765..45ab3a6 100755 --- a/scripts/neovim.sh +++ b/scripts/neovim.sh @@ -4,8 +4,8 @@ VERSION="v0.5.0" function install () { cd ~ - wget https://github.com/neovim/neovim/releases/download/$VERSION/nvim.appimage - wget https://github.com/neovim/neovim/releases/download/$VERSION/nvim.appimage.sha256sum + wget https://github.com/neovim/neovim/releases/download/${VERSION}/nvim.appimage + wget https://github.com/neovim/neovim/releases/download/${VERSION}/nvim.appimage.sha256sum sha256sum nvim.appimage sudo chmod u+x nvim.appimage ./nvim.appimage --appimage-extract diff --git a/scripts/python.sh b/scripts/python.sh index c27e72a..44db94c 100755 --- a/scripts/python.sh +++ b/scripts/python.sh @@ -4,7 +4,7 @@ VERSION="3.9.6" function install () { cd ~ - curl -O https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz + curl -O https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz sudo tar -xvzf Python-${VERSION}.tgz cd Python-${VERSION} ./configure \ @@ -19,10 +19,10 @@ function install () { curl -O https://bootstrap.pypa.io/get-pip.py sudo /opt/python/${VERSION}/bin/python3 get-pip.py - sudo rm Python-$VERSION.tgz - sudo rm -rf Python-$VERSION + sudo rm Python-${VERSION}.tgz + sudo rm -rf Python-${VERSION} sudo rm get-pip.py - + printf "\n\n" python3 --version } @@ -33,4 +33,4 @@ if [ "$1" == "install" ]; then # uninstall else echo "Only install and uninstall" -fi \ No newline at end of file +fi