13 pkg_get_current_version() {
14 # 'bat --version' has output in this format:
16 # This trims it down to just the version number:
18 echo $(bat --version 2>/dev/null | head -n 1 | cut -d' ' -f 2)
23 mkdir -p "$pkg_src_bin"
25 # mv ./bat-*/bat ~/.local/opt/bat-v0.15.4/bin/bat
26 mv ./bat-*/bat "$pkg_src_cmd"
28 # chmod a+x ~/.local/opt/bat-v0.15.4/bin/bat
29 chmod a+x "$pkg_src_cmd"