X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=bat%2Finstall.sh;h=142efda05218672e5771efa026b8006523013051;hb=4edf137e5d6b65f9ac847db6694ac387c7e91f3e;hp=aba2469c2c42b0ca2083cb1fa35bc4f0ea2acfb4;hpb=1f0e9e5143e81b48c880dae234a5df56ba9c6a35;p=webi-installers%2F.git diff --git a/bat/install.sh b/bat/install.sh index aba2469..142efda 100644 --- a/bat/install.sh +++ b/bat/install.sh @@ -1,8 +1,8 @@ #!/bin/bash +set -e +set -u -{ - set -e - set -u +function __init_bat() { ############### # Install bat # @@ -11,21 +11,23 @@ WEBI_SINGLE=true pkg_get_current_version() { - # 'bat --version' has output in this format: - # bat 0.15.4 - # This trims it down to just the version number: - # 0.15.4 - echo $(bat --version 2>/dev/null | head -n 1 | cut -d' ' -f 2) + # 'bat --version' has output in this format: + # bat 0.15.4 + # This trims it down to just the version number: + # 0.15.4 + echo $(bat --version 2> /dev/null | head -n 1 | cut -d' ' -f 2) } pkg_install() { - # $HOME/.local/xbin + # ~/.local/xbin mkdir -p "$pkg_src_bin" - # mv ./bat-*/bat "$HOME/.local/opt/bat-v0.15.4/bin/bat" + # mv ./bat-*/bat ~/.local/opt/bat-v0.15.4/bin/bat mv ./bat-*/bat "$pkg_src_cmd" - # chmod a+x "$HOME/.local/xbin/rg-v11.1.0" + # chmod a+x ~/.local/opt/bat-v0.15.4/bin/bat chmod a+x "$pkg_src_cmd" } } + +__init_bat