Files
vim-ale/gitea/install.sh
2020-06-16 10:52:03 +00:00

20 lines
492 B
Bash

set -e
set -u
pkg_cmd_name="gitea"
WEBI_SINGLE=true
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:
# 2.0.0
echo "$(gitea --version 2>/dev/null | head -n 1 | cut -d' ' -f3)"
}
pkg_format_cmd_version() {
# 'gitea v2.1.0' is the canonical version format for gitea
my_version="$1"
echo "$pkg_cmd_name v$my_version"
}