Remove shell fix script
This commit is contained in:
parent
861ba79fd2
commit
39badfc0ed
2 changed files with 0 additions and 41 deletions
|
@ -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
|
|
|
@ -46,13 +46,6 @@
|
||||||
when:
|
when:
|
||||||
ansible_facts['distribution'] == 'Debian'
|
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
|
- name: Install neovim with pip for Debian
|
||||||
pip:
|
pip:
|
||||||
name: neovim
|
name: neovim
|
||||||
|
|
Loading…
Add table
Reference in a new issue