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:
+4
-3
@@ -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]";
|
||||
|
||||
Reference in New Issue
Block a user