#!/usr/bin/env bash BASE_FOLDER=$(dirname "$(readlink -f "$0")")"/"; # shellcheck source=init.sh . "${BASE_FOLDER}init.sh"; if [ -z "${1}" ]; then echo "Please give a Gitea version to upgrade to"; exit; fi; file_name="${download_folder}gitea-${1}-${arch}.xz"; if [ ! -f "${file_name}" ]; then echo "Cannot find file: ${file_name}"; exit; fi; echo -e "Update gitea to ${1} ... "; systemctl stop gitea; xz -dc "${file_name}" > "${target_file}"; chmod +x "${target_file}"; systemctl start gitea; echo "[DONE]"; # __END__