From e3abbb56072bda3ed5f792d287fa9e287b1e67c7 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 19:05:51 +0300 Subject: [PATCH 01/12] Add quick environment generator --- env/.zshrc | 32 ++++++++++++++++++++ env/nvim/init.vim | 17 +++++++++++ tools/env.sh | 76 +++++++++++++++++++++++++++++++++++++++++++++++ tools/link_env.sh | 11 +++++++ 4 files changed, 136 insertions(+) create mode 100644 env/.zshrc create mode 100644 env/nvim/init.vim create mode 100755 tools/env.sh create mode 100644 tools/link_env.sh diff --git a/env/.zshrc b/env/.zshrc new file mode 100644 index 0000000..68b148e --- /dev/null +++ b/env/.zshrc @@ -0,0 +1,32 @@ + +export ZSH="$HOME/.env/oh-my-zsh" + +ZSH_THEME="ivabus" +ENABLE_CORRECTION="true" +plugins=(git zsh-syntax-highlighting) + +# Function to quickly show stats on systemload, usage of filesystems, usage of ram/swap and uptime +stats () { + AVLD=$(cut -d " " -f1-3 /proc/loadavg) + USEDMEM=$(free -h | grep Mem | awk '{print $3 " / " $2}') + USEDSWAP=$(free -h | grep Swap | awk '{ print $3 " / " $2}') + USEDSTRG=$(df / -h | tail -n 1 | awk '{print $3}') + USEDSTRGPERC=$(df / -h | tail -n 1 | awk '{print $5}') + STRG=$(df / -h | tail -n 1 | awk '{print $2}') + USEDSTRGHOME=$(df /home -h | tail -n 1 | awk '{print $3}') + USEDSTRGPERCHOME=$(df /home -h | tail -n 1 | awk '{print $5}') + STRGHOME=$(df /home -h | tail -n 1 | awk '{print $2}') + UPTIME=$(uptime -p) + printf "\e[0;34msystem load:\e[m\t${AVLD}\n" + printf "\e[0;34musage of /:\e[m\t${USEDSTRGPERC}% (${USEDSTRG}/${STRG})\n" + printf "\e[0;34musage of /home:\e[m\t${USEDSTRGPERCHOME}% (${USEDSTRGHOME}/${STRGHOME})\n" + printf "\e[0;34mmemory usage:\e[m\t${USEDMEM}\n" + printf "\e[0;34mswap usage:\e[m\t${USEDSWAP}\n" + printf "\e[0;34muptime:\e[m\t\t${UPTIME}\n" +} + +source $ZSH/oh-my-zsh.sh +export REPORTTIME=10 +alias vi="nvim" +alias vim="nvim" +alias timestamp='date -u +%FT%TZ' diff --git a/env/nvim/init.vim b/env/nvim/init.vim new file mode 100644 index 0000000..3762d50 --- /dev/null +++ b/env/nvim/init.vim @@ -0,0 +1,17 @@ +filetype plugin indent on +set showmatch +set hlsearch +set incsearch +set autoindent +set expandtab +set tabstop=4 +set shiftwidth=4 +set number +set wildmode=longest, list +set cc=80 +syntax on +set noswapfile +set backupdir=~/.cache/vim +set completeopt=noinsert,menuone,noselect +set cursorline +set relativenumber diff --git a/tools/env.sh b/tools/env.sh new file mode 100755 index 0000000..a18c11d --- /dev/null +++ b/tools/env.sh @@ -0,0 +1,76 @@ +#!/bin/sh + +install_compilers() { + echo "=> Installing rust" + $TEA +rust-lang.org zsh -c "exit" + echo "=> Installing llvm" + $TEA +llvm.org zsh -c "exit" + echo "=> Installing python" + $TEA +python.org zsh -c "exit" +} + +install_tools() { + echo "=> Installing git" + $TEA +git-scm.org zsh -c "exit" + echo "=> Installing GitHub CLI" + $TEA +cli.github.com zsh -c "exit" + echo "=> Installing make & automake & cmake & meson & ninja" + $TEA +gnu.org/make zsh -c "exit" + $TEA +gnu.org/automake zsh -c "exit" + $TEA +cmake.org zsh -c "exit" + $TEA +mesonbuild.com zsh -c "exit" + $TEA +ninja-build.org zsh -c "exit" +} + +echo "=> This script will create small environment" +echo " with dotfiles from ivabus/ivabus-dotfiles" +echo ":: Press enter for continue" +read + +echo "=> Installing env to ~/.env" +mkdir -p ~/.env/bin > /dev/null 2>&1 + +TEA_PREFIX=~/.env/tea +TEA=~/.env/tea/tea.xyz/v0/bin/tea +PATH=$PATH + +echo "=> Installing static zsh" +sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)" -q -d ~/.env -e no +PATH="$HOME/.env/bin:$PATH" + +echo "=> Installing tea" +sh <(curl https://tea.xyz) -s +echo "=> Installing neovim" +$TEA +neovim.io zsh -c "exit" +echo "=> Installing htop" +$TEA +htop.dev zsh -c "exit" + + +echo -n ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (Y/n): " +read $INSTALL_COMPILERS +if [ "${INSTALL_COMPILERS^^}" = "Y" ]; then + install_compilers +fi + +echo -n ":: Would you like to install development tools (git, github cli, make/cmake/meson/ninja)? (Y/n): " +read $INSTALL_TOOLS +if [ "${INSTALL_TOOLS^^}" = "Y" ]; then + install_tools +fi + +echo "=> Configuring \$PATH" +for i in "tea" "nvim" "clang" "clang++" "lldb" "rustc" "cargo" "htop" "make" "cmake" "automake" "meson" "ninja" "git" "gh" +do + ln -s $TEA ~/.env/bin/$i +done + +echo "=> Installing dotfiles" +git clone https://github.com/ivabus/ivabus-dotfiles ~/.env/dotfiles +sh ~/.env/dotfiles/tools/link_env.sh +ZSH="$HOME/.env/oh-my-zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended > /dev/null 2>&1 +curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.env/oh-my-zsh/custom/themes/ivabus.zsh-theme > /dev/null 2>&1 +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.env/oh-my-zsh/custom/plugins/zsh-syntax-highlighting > /dev/null 2>&1 + +echo "=> Environment installed to ~/.env" +echo " To start environment just type:" +echo " PATH=\"\$HOME/.env/bin:\$PATH\" zsh" diff --git a/tools/link_env.sh b/tools/link_env.sh new file mode 100644 index 0000000..5d18bf8 --- /dev/null +++ b/tools/link_env.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +echo "=> Linking zshrc" +if [ -f ~/.zshrc ]; then + echo "=> Moving old zshrc to ~/.zshrc.old" + mv ~/.zshrc ~/.zshrc.old +fi +ln -s ~/.env/dotfiles/.zshrc ~/.zshrc +echo "=> Linking neovim files" +rm -rf ${XDG_CONFIG_HOME:-$HOME/.config}/nvim +ln -s ~/.env/dotfiles/nvim ${XDG_CONFIG_HOME:-$HOME/.config}/nvim From e079f545810ebc97c88d4c2872359e44a895aa9a Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 19:06:00 +0300 Subject: [PATCH 02/12] Fix homebrew installation --- tools/mac.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mac.sh b/tools/mac.sh index dc46479..fb9aa68 100755 --- a/tools/mac.sh +++ b/tools/mac.sh @@ -11,7 +11,7 @@ if [ "$(arch)" == "arm64" ] then HOMEBREW_PREFIX="/opt/homebrew" else - HOMEBREW_PREFIX="/usr/local/homebrew" + HOMEBREW_PREFIX="/usr/local" fi echo "eval \"\$($HOMEBREW_PREFIX/bin/brew shellenv)\"" >> $HOME/.zprofile brew install pinentry-mac gpg2 From e6e7300c71831072e56c43d27aea63bf77380c9c Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 19:07:23 +0300 Subject: [PATCH 03/12] Add env to README.md and edit curl commands --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cd2591b..6038004 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ During the installation you can configure git by embedded configurator: - code signing ```sh -sh -c "$(curl -fsSL https://ivabus.dev/dotfiles)" +sh <(curl ivabus.dev/dotfiles) ``` ### Upgrading dotfiles @@ -29,3 +29,11 @@ Just run `upgrade_dotfiles` in your shell. Script will `git pull`, then relink o #![screenshot-2022-12-08_18-08-29](https://user-images.githubusercontent.com/71599788/206481983-5dac2d62-5aea-4ccf-990a-b9ee6d53422f.png) [Repo Packages](https://ivabus.dev/pkgs), [AUR packages](https://ivabus.dev/aur). + +## Environment + +TODO: description + +```sh +sh <(curl ivabus.dev/env) +``` \ No newline at end of file From d25795addfa604700c6e4f29c39ea40474b5f0ba Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 19:10:46 +0300 Subject: [PATCH 04/12] Commit to verify last commits (gpg failed) From 744950bf9b230b20c095187ea74bada23dc926ac Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 19:23:39 +0300 Subject: [PATCH 05/12] Fix links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6038004..f0fb25a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ During the installation you can configure git by embedded configurator: - code signing ```sh -sh <(curl ivabus.dev/dotfiles) +sh <(curl https://ivabus.dev/dotfiles) ``` ### Upgrading dotfiles @@ -35,5 +35,5 @@ Just run `upgrade_dotfiles` in your shell. Script will `git pull`, then relink o TODO: description ```sh -sh <(curl ivabus.dev/env) +sh <(curl https://ivabus.dev/env) ``` \ No newline at end of file From 9364f686ff3424c65b72c4a75091ee3384e01262 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 20:00:56 +0300 Subject: [PATCH 06/12] Fix env.sh --- tools/env.sh | 58 ++++++++++++++++++++--------------------------- tools/link_env.sh | 2 +- 2 files changed, 26 insertions(+), 34 deletions(-) diff --git a/tools/env.sh b/tools/env.sh index a18c11d..02ef468 100755 --- a/tools/env.sh +++ b/tools/env.sh @@ -1,27 +1,5 @@ #!/bin/sh -install_compilers() { - echo "=> Installing rust" - $TEA +rust-lang.org zsh -c "exit" - echo "=> Installing llvm" - $TEA +llvm.org zsh -c "exit" - echo "=> Installing python" - $TEA +python.org zsh -c "exit" -} - -install_tools() { - echo "=> Installing git" - $TEA +git-scm.org zsh -c "exit" - echo "=> Installing GitHub CLI" - $TEA +cli.github.com zsh -c "exit" - echo "=> Installing make & automake & cmake & meson & ninja" - $TEA +gnu.org/make zsh -c "exit" - $TEA +gnu.org/automake zsh -c "exit" - $TEA +cmake.org zsh -c "exit" - $TEA +mesonbuild.com zsh -c "exit" - $TEA +ninja-build.org zsh -c "exit" -} - echo "=> This script will create small environment" echo " with dotfiles from ivabus/ivabus-dotfiles" echo ":: Press enter for continue" @@ -31,7 +9,7 @@ echo "=> Installing env to ~/.env" mkdir -p ~/.env/bin > /dev/null 2>&1 TEA_PREFIX=~/.env/tea -TEA=~/.env/tea/tea.xyz/v0/bin/tea +TEA=~/.env/tea/tea.xyz/v0.18.0/bin/tea PATH=$PATH echo "=> Installing static zsh" @@ -39,23 +17,37 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/ins PATH="$HOME/.env/bin:$PATH" echo "=> Installing tea" -sh <(curl https://tea.xyz) -s +zsh -c "TEA_PREFIX=~/.env/tea YES=1 sh <(curl https://tea.xyz)" echo "=> Installing neovim" $TEA +neovim.io zsh -c "exit" echo "=> Installing htop" $TEA +htop.dev zsh -c "exit" -echo -n ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (Y/n): " -read $INSTALL_COMPILERS -if [ "${INSTALL_COMPILERS^^}" = "Y" ]; then - install_compilers +echo -n ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " +read INSTALL_COMPILERS +if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then + echo "=> Installing rust" + $TEA +rust-lang.org zsh -c "exit" + echo "=> Installing llvm" + $TEA +llvm.org zsh -c "exit" + echo "=> Installing python" + $TEA +python.org zsh -c "exit" fi -echo -n ":: Would you like to install development tools (git, github cli, make/cmake/meson/ninja)? (Y/n): " -read $INSTALL_TOOLS -if [ "${INSTALL_TOOLS^^}" = "Y" ]; then - install_tools +echo -n ":: Would you like to install development tools (git, github cli, make/cmake/meson/ninja)? (y/N): " +read INSTALL_TOOLS +if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then + echo "=> Installing git" + $TEA +git-scm.org zsh -c "exit" + echo "=> Installing GitHub CLI" + $TEA +cli.github.com zsh -c "exit" + echo "=> Installing make & automake & cmake & meson & ninja" + $TEA +gnu.org/make zsh -c "exit" + $TEA +gnu.org/automake zsh -c "exit" + $TEA +cmake.org zsh -c "exit" + $TEA +mesonbuild.com zsh -c "exit" + $TEA +ninja-build.org zsh -c "exit" fi echo "=> Configuring \$PATH" @@ -66,10 +58,10 @@ done echo "=> Installing dotfiles" git clone https://github.com/ivabus/ivabus-dotfiles ~/.env/dotfiles -sh ~/.env/dotfiles/tools/link_env.sh ZSH="$HOME/.env/oh-my-zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended > /dev/null 2>&1 curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.env/oh-my-zsh/custom/themes/ivabus.zsh-theme > /dev/null 2>&1 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.env/oh-my-zsh/custom/plugins/zsh-syntax-highlighting > /dev/null 2>&1 +sh ~/.env/dotfiles/tools/link_env.sh echo "=> Environment installed to ~/.env" echo " To start environment just type:" diff --git a/tools/link_env.sh b/tools/link_env.sh index 5d18bf8..b1765c1 100644 --- a/tools/link_env.sh +++ b/tools/link_env.sh @@ -5,7 +5,7 @@ if [ -f ~/.zshrc ]; then echo "=> Moving old zshrc to ~/.zshrc.old" mv ~/.zshrc ~/.zshrc.old fi -ln -s ~/.env/dotfiles/.zshrc ~/.zshrc +ln -s ~/.env/dotfiles/env/.zshrc ~/.zshrc echo "=> Linking neovim files" rm -rf ${XDG_CONFIG_HOME:-$HOME/.config}/nvim ln -s ~/.env/dotfiles/nvim ${XDG_CONFIG_HOME:-$HOME/.config}/nvim From e231498176aefd018f8a45d83b1a92f276c85f54 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 23:38:35 +0300 Subject: [PATCH 07/12] Add colors --- tools/env.sh | 53 +++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/tools/env.sh b/tools/env.sh index 02ef468..2ed140b 100755 --- a/tools/env.sh +++ b/tools/env.sh @@ -1,48 +1,51 @@ #!/bin/sh -echo "=> This script will create small environment" +NC='\033[0m' +Green='\033[1;32m' +ARROW="${Green}=>${NC}" +INPUT="${Green}::${NC}" + +echo "${ARROW} This script will create small environment" echo " with dotfiles from ivabus/ivabus-dotfiles" -echo ":: Press enter for continue" +echo "${INPUT} Press enter to continue" read -echo "=> Installing env to ~/.env" +echo "${ARROW} Installing env to ~/.env" mkdir -p ~/.env/bin > /dev/null 2>&1 TEA_PREFIX=~/.env/tea -TEA=~/.env/tea/tea.xyz/v0.18.0/bin/tea +TEA=~/.env/tea/tea.xyz/v0/bin/tea PATH=$PATH -echo "=> Installing static zsh" +echo "${ARROW} Installing static zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)" -q -d ~/.env -e no PATH="$HOME/.env/bin:$PATH" -echo "=> Installing tea" -zsh -c "TEA_PREFIX=~/.env/tea YES=1 sh <(curl https://tea.xyz)" -echo "=> Installing neovim" +echo "${ARROW} Installing tea" +zsh -c "sh <(curl https://tea.xyz) --prefix $TEA_PREFIX --yes" + +echo "${ARROW} Installing neovim" $TEA +neovim.io zsh -c "exit" -echo "=> Installing htop" +echo "${ARROW} Installing htop" $TEA +htop.dev zsh -c "exit" +echo "${ARROW} Installing git" +$TEA +git-scm.org zsh -c "exit" - -echo -n ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " -read INSTALL_COMPILERS +read -p "${INPUT} Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " INSTALL_COMPILERS if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then - echo "=> Installing rust" + echo "${ARROW} Installing rust" $TEA +rust-lang.org zsh -c "exit" - echo "=> Installing llvm" + echo "${ARROW} Installing llvm" $TEA +llvm.org zsh -c "exit" - echo "=> Installing python" + echo "${ARROW} Installing python" $TEA +python.org zsh -c "exit" fi -echo -n ":: Would you like to install development tools (git, github cli, make/cmake/meson/ninja)? (y/N): " -read INSTALL_TOOLS +read -p "${INPUT} Would you like to install development tools (GitHub CLI, make/cmake/meson/ninja)? (y/N): " INSTALL_TOOLS if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then - echo "=> Installing git" - $TEA +git-scm.org zsh -c "exit" - echo "=> Installing GitHub CLI" + echo "${ARROW} Installing GitHub CLI" $TEA +cli.github.com zsh -c "exit" - echo "=> Installing make & automake & cmake & meson & ninja" + echo "${ARROW} Installing make & automake & cmake & meson & ninja" $TEA +gnu.org/make zsh -c "exit" $TEA +gnu.org/automake zsh -c "exit" $TEA +cmake.org zsh -c "exit" @@ -50,19 +53,19 @@ if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then $TEA +ninja-build.org zsh -c "exit" fi -echo "=> Configuring \$PATH" +echo "${ARROW} Configuring \$PATH" for i in "tea" "nvim" "clang" "clang++" "lldb" "rustc" "cargo" "htop" "make" "cmake" "automake" "meson" "ninja" "git" "gh" do ln -s $TEA ~/.env/bin/$i done -echo "=> Installing dotfiles" +echo "${ARROW} Installing dotfiles" git clone https://github.com/ivabus/ivabus-dotfiles ~/.env/dotfiles ZSH="$HOME/.env/oh-my-zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended > /dev/null 2>&1 curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.env/oh-my-zsh/custom/themes/ivabus.zsh-theme > /dev/null 2>&1 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.env/oh-my-zsh/custom/plugins/zsh-syntax-highlighting > /dev/null 2>&1 sh ~/.env/dotfiles/tools/link_env.sh -echo "=> Environment installed to ~/.env" +echo "${ARROW} Environment installed to ~/.env" echo " To start environment just type:" -echo " PATH=\"\$HOME/.env/bin:\$PATH\" zsh" +echo " PATH=\"\$HOME/.env/bin:\$PATH\" zsh" \ No newline at end of file From 08b2ee203cc95e16b004061443cfbd390c25a16e Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 23:38:55 +0300 Subject: [PATCH 08/12] Fix colors --- tools/env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/env.sh b/tools/env.sh index 2ed140b..1f1f3d9 100755 --- a/tools/env.sh +++ b/tools/env.sh @@ -31,7 +31,7 @@ $TEA +htop.dev zsh -c "exit" echo "${ARROW} Installing git" $TEA +git-scm.org zsh -c "exit" -read -p "${INPUT} Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " INSTALL_COMPILERS +read -p ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " INSTALL_COMPILERS if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then echo "${ARROW} Installing rust" $TEA +rust-lang.org zsh -c "exit" @@ -41,7 +41,7 @@ if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then $TEA +python.org zsh -c "exit" fi -read -p "${INPUT} Would you like to install development tools (GitHub CLI, make/cmake/meson/ninja)? (y/N): " INSTALL_TOOLS +read -p ":: Would you like to install development tools (GitHub CLI, make/cmake/meson/ninja)? (y/N): " INSTALL_TOOLS if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then echo "${ARROW} Installing GitHub CLI" $TEA +cli.github.com zsh -c "exit" From fc3205c8181029d1dd3939da2cf394da26178654 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 3 Jan 2023 23:47:36 +0300 Subject: [PATCH 09/12] Remove --yes from tea.xyz installation --- tools/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/env.sh b/tools/env.sh index 1f1f3d9..608bc65 100755 --- a/tools/env.sh +++ b/tools/env.sh @@ -22,7 +22,7 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/ins PATH="$HOME/.env/bin:$PATH" echo "${ARROW} Installing tea" -zsh -c "sh <(curl https://tea.xyz) --prefix $TEA_PREFIX --yes" +zsh -c "sh <(curl https://tea.xyz) --prefix $TEA_PREFIX" echo "${ARROW} Installing neovim" $TEA +neovim.io zsh -c "exit" From ea52577b106ba036600f068c1b82454c8af27724 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Wed, 4 Jan 2023 10:20:36 +0300 Subject: [PATCH 10/12] Add colors to input --- tools/env.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/env.sh b/tools/env.sh index 608bc65..ab3bce6 100755 --- a/tools/env.sh +++ b/tools/env.sh @@ -30,8 +30,8 @@ echo "${ARROW} Installing htop" $TEA +htop.dev zsh -c "exit" echo "${ARROW} Installing git" $TEA +git-scm.org zsh -c "exit" - -read -p ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " INSTALL_COMPILERS +printf "${INPUT}" +read -p " Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " INSTALL_COMPILERS if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then echo "${ARROW} Installing rust" $TEA +rust-lang.org zsh -c "exit" @@ -41,7 +41,8 @@ if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then $TEA +python.org zsh -c "exit" fi -read -p ":: Would you like to install development tools (GitHub CLI, make/cmake/meson/ninja)? (y/N): " INSTALL_TOOLS +printf "${INPUT}" +read -p " Would you like to install development tools (GitHub CLI, make/cmake/meson/ninja)? (y/N): " INSTALL_TOOLS if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then echo "${ARROW} Installing GitHub CLI" $TEA +cli.github.com zsh -c "exit" From c6c91e55dc20e74d114fa83cf2c3555189cfc07d Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Wed, 4 Jan 2023 12:06:55 +0300 Subject: [PATCH 11/12] tools/git.sh: fix editor configuration --- tools/git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/git.sh b/tools/git.sh index 600c055..2562203 100755 --- a/tools/git.sh +++ b/tools/git.sh @@ -20,7 +20,7 @@ fi git config --global pull.rebase false read -p "Enter your preferred editor (default: nvim): " GITEDITOR -if [ $GITEDITOR = ""] +if [ $GITEDITOR == "" ] then GITEDITOR="nvim" fi From b817cc7b33f913768491e9d9935bed90d301959a Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Wed, 4 Jan 2023 12:07:16 +0300 Subject: [PATCH 12/12] tools/git.sh: fix gpg program --- tools/git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/git.sh b/tools/git.sh index 2562203..4f0ba62 100755 --- a/tools/git.sh +++ b/tools/git.sh @@ -9,7 +9,7 @@ read -p "Configure GPG signing for git? (y/N): " answer if [[ $answer = [Yy] ]]; then git config --global commit.gpgsign true - git config --global gpg.program gpg2 + git config --global gpg.program gpg read -p "Enter your GPG key ID: " GPGKEYID git config --global user.signingkey "${GPGKEYID}" else