From abcf738c28c715f1008f85494a46da5adb0fd315 Mon Sep 17 00:00:00 2001 From: Ibrahim <8837895+IbrahimTanyalcin@users.noreply.github.com> Date: Mon, 22 Jul 2024 21:21:18 +0000 Subject: [PATCH] halt on installing 1password if signature verification fails, link -f snap neovim to usr/local/bin/nvim --- install/desktop/optional/app-1password.sh | 16 ++++++++++------ install/terminal/app-neovim.sh | 4 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/install/desktop/optional/app-1password.sh b/install/desktop/optional/app-1password.sh index 39912769..c4ff07bb 100755 --- a/install/desktop/optional/app-1password.sh +++ b/install/desktop/optional/app-1password.sh @@ -9,12 +9,16 @@ case "$ARCH" in curl -sSO https://downloads.1password.com/linux/tar/stable/aarch64/1password-latest.tar.gz.sig gpg --keyserver keyserver.ubuntu.com --recv-keys 3FEF9748469ADBE15DA7CA80AC2D62742012EA22 gpg --verify 1password-latest.tar.gz.sig 1password-latest.tar.gz - [ $? -eq 0 ] || { cd - && false; } - sudo tar -xf 1password-latest.tar.gz - sudo mkdir -p /opt/1Password - sudo mv 1password-*/* /opt/1Password - sudo /opt/1Password/after-install.sh - cd - + if [[ $? -eq 0 ]]; then + sudo tar -xf 1password-latest.tar.gz + sudo mkdir -p /opt/1Password + sudo mv 1password-*/* /opt/1Password + sudo /opt/1Password/after-install.sh + cd - + else + cd - + false + fi ;; *) # Install 1password and 1password-cli single script diff --git a/install/terminal/app-neovim.sh b/install/terminal/app-neovim.sh index 3f5fe023..21806f7b 100644 --- a/install/terminal/app-neovim.sh +++ b/install/terminal/app-neovim.sh @@ -9,7 +9,9 @@ if [[ "${ARCH}" == "aarch64" ]]; then sudo apt update sudo apt install -y snapd fi - sudo snap install --classic nvim && NEOVIM_SUCCESS=true + sudo snap install --classic nvim \ + && sudo ln -sf /snap/bin/nvim /usr/local/bin/nvim \ + && NEOVIM_SUCCESS=true else if wget -O nvim.tar.gz "https://github.com/neovim/neovim/releases/latest/download/nvim-linu${ARCH}.tar.gz"; then tar -xf nvim.tar.gz