From 39badfc0edcbc4724ecaee672d3e2a4e008a3226 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Mon, 8 Aug 2022 20:16:04 +0200 Subject: [PATCH] Remove shell fix script --- roles/neovim/scripts/shellcheck_binary_fix.sh | 34 ------------------- roles/neovim/tasks/main.yml | 7 ---- 2 files changed, 41 deletions(-) delete mode 100755 roles/neovim/scripts/shellcheck_binary_fix.sh diff --git a/roles/neovim/scripts/shellcheck_binary_fix.sh b/roles/neovim/scripts/shellcheck_binary_fix.sh deleted file mode 100755 index 2bf2754..0000000 --- a/roles/neovim/scripts/shellcheck_binary_fix.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -## This script is a workaround for installing shellcheck with the precompiled -# binary. It is intended to be run when the shellcheck package isn't found via -# pacman. - -RED=$(tput setaf 1) -GREEN=$(tput setaf 2) -ORANGE=$(tput setaf 3) -NC=$(tput sgr0) - -if ! sudo pacman -S --needed shellcheck; then - echo " ${ORANGE}Shellcheck was not found with pacman, downloading pre-compiled binary${NC}" - scversion="stable" - architechture=$(uname -m) - if [ -e ~/Downloads/shellcheck-${scversion} ]; then - rm -r ~/Downloads/shellcheck-${scversion} && echo " ${ORANGE}Found and removed pre-existing shellcheck folder${NC}" - fi - cd ~/Downloads || exit 1 - echo " Downloading shellcheck ${scversion} binary for ${architechture}..." - if wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.${architechture?}.tar.xz" | tar -xJv; then - echo " ${GREEN}Successfully downloaded and extracted shellcheck.${NC}" - echo " Copying executable to /usr/bin/ ..." - sudo cp "shellcheck-${scversion}/shellcheck" /usr/bin/ && shellcheck --version - if rm -r ~/Downloads/shellcheck-${scversion}; then - echo " ${GREEN}Removed shellcheck installation folder${NC}" - else - echo " ${RED}Was unable to remove shellcheck installation folder${NC}" - exit 1 - fi - else - echo " ${RED}Was unable to download shellcheck binary${NC}" - fi -fi diff --git a/roles/neovim/tasks/main.yml b/roles/neovim/tasks/main.yml index 180d114..bb019a7 100644 --- a/roles/neovim/tasks/main.yml +++ b/roles/neovim/tasks/main.yml @@ -46,13 +46,6 @@ when: ansible_facts['distribution'] == 'Debian' -# some Arch derivatives don't have the shellcheck package (arch32, archarm) -- name: Run shellcheck script - script: scripts/shellcheck_binary_fix.sh - register: shellcheck_script - when: ansible_facts['distribution'] == 'Archlinux' - changed_when: "'there is nothing to do' not in shellcheck_script.stdout" - - name: Install neovim with pip for Debian pip: name: neovim