X-Git-Url: https://git.josue.xyz/?p=webi-installers%2F.git;a=blobdiff_plain;f=gitea%2Finstall.sh;fp=gitea%2Finstall.sh;h=5726292945fdc4b0f16ed4da0515567de4978974;hp=bb55c660fdb6cf7afd36ebff139d2e4201cd9be9;hb=ca7a838c6fde6052124947ff442aa9e6056f5e28;hpb=704265583cff80363fec60c4088f5b91f6d98bd0 diff --git a/gitea/install.sh b/gitea/install.sh index bb55c66..5726292 100644 --- a/gitea/install.sh +++ b/gitea/install.sh @@ -1,3 +1,4 @@ +#!/bin/bash set -e set -u @@ -5,7 +6,7 @@ pkg_cmd_name="gitea" pkg_src_cmd="$HOME/.local/opt/gitea-v$WEBI_VERSION/gitea" pkg_dst_cmd="$HOME/.local/opt/gitea/gitea" -pkg_get_current_version() { +function pkg_get_current_version() { # 'gitea version' has output in this format: # v2.1.0 h1:pQSaIJGFluFvu8KDGDODV8u4/QRED/OPyIR+MWYYse8= # This trims it down to just the version number: @@ -13,7 +14,7 @@ pkg_get_current_version() { echo "$(gitea --version 2> /dev/null | head -n 1 | cut -d' ' -f3)" } -pkg_link() { +function pkg_link() { # although gitea is a single command it must be put in its own directory # because it will always resolve its working path to its location, # regardless of where it was started, where its config file lives, etc. @@ -24,7 +25,7 @@ pkg_link() { } # For installing from the extracted package tmp directory -pkg_install() { +function pkg_install() { # remove the versioned folder, just in case it's there with junk rm -rf "$pkg_src_bin" mkdir -p "$pkg_src_bin"