From 1725e27fa1c4e186c1f3e3ffaa3faaf76e300c1d Mon Sep 17 00:00:00 2001 From: Anton Volnuhin Date: Tue, 21 May 2024 02:36:07 +0300 Subject: [PATCH] bug fixed in print_block --- run_onchange_after_install_main_deps.sh.tmpl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/run_onchange_after_install_main_deps.sh.tmpl b/run_onchange_after_install_main_deps.sh.tmpl index a5f75ab..f433454 100644 --- a/run_onchange_after_install_main_deps.sh.tmpl +++ b/run_onchange_after_install_main_deps.sh.tmpl @@ -45,13 +45,12 @@ print_block () { local ln=$(get_line) if [[ "$ln" -lt "$(($LINES - $STEPS))" ]];then - tput csr 0 $LINES tput cup $(($LINES - $STEPS - 2)) 0 else ln=$(($LINES - $STEPS - 1)) fi echo "..........................................................." - for i in $(seq 1 12) + for i in $(seq 1 $STEPS) do echo -n " >" tput el @@ -141,8 +140,8 @@ new_line "Install base packages" if ! type nix &> /dev/null then new_line "Install nix packet manager (single user)" - bash <(curl --silent -L https://nixos.org/nix/install) --no-daemon 2>&1|pad - . ~/.nix-profile/etc/profile.d/nix.sh 2>&1|pad + bash <(curl --silent -L https://nixos.org/nix/install) --no-daemon 2>&1|pad + source ~/.nix-profile/etc/profile.d/nix.sh fi @@ -188,18 +187,23 @@ new_line "via NIX" nix-env -iA nixpkgs.atuin nixpkgs.jump nixpkgs.du-dust nixpkgs.lazygit 2>&1|pad {{ else if eq .chezmoi.osRelease.id "arch" -}} +new_line "via Pacman" sudo pacman -Sy --noconfirm neovim fish atuin $ACT_PACKAGES fd skim lazygit 2>&1|pad +new_line "via NIX" nix-env -iA nixpkgs.jump nixpkgs.du-dust 2>&1|pad {{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}} - sudo apt install fish neovim $ACT_PACKAGES libpam-ssh-agent-auth -y 2>&1|pad +new_line "via APT" + sudo apt-get install fish neovim $ACT_PACKAGES libpam-ssh-agent-auth -y 2>&1|pad +new_line "via NIX" + nix-env -iA nixpkgs.neovim nixpkgs.jump nixpkgs.skim nixpkgs.du-dust nixpkgs.atuin 2>&1|pad + +new_line "manually installing LazyGit" LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') curl --silent -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" 2>&1|pad tar xf lazygit.tar.gz lazygit 2>&1|pad sudo install lazygit /usr/local/bin 2>&1|pad - - nix-env -iA nixpkgs.neovim nixpkgs.jump nixpkgs.skim nixpkgs.du-dust nixpkgs.atuin 2>&1|pad {{ end -}} {{ if eq .chezmoi.os "linux" -}}