Update gitea download and switch to xz files

XZ files are downloaded
Change that any grep is replaced by jq command, and sed for " replace

Add systemd service files as samples
This commit is contained in:
Clemens Schwaighofer
2026-04-23 14:11:31 +09:00
parent 26cbfbe39f
commit a58e0d8de5
8 changed files with 75 additions and 11 deletions
+4 -3
View File
@@ -8,14 +8,15 @@ if [ -z "${1}" ]; then
echo "Please give a Gitea version to upgrade to";
exit;
fi;
if [ ! -f "${download_folder}gitea-${1}-${arch}" ]; then
echo "Cannot find file: ${download_folder}gitea-${1}-${arch}";
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;
cp "${download_folder}gitea-${1}-${arch}" "${target_file}";
xz -dc "${file_name}" > "${target_file}";
chmod +x "${target_file}";
systemctl start gitea;
echo "[DONE]";