Change download folder to sub folder in this script

Also check if target gitea file exists and abort if not
This commit is contained in:
Clemens Schwaighofer
2024-08-28 10:16:34 +09:00
parent f8fa542278
commit 2b4a307765
2 changed files with 7 additions and 1 deletions

View File

@@ -15,12 +15,16 @@ else
exit;
fi;
arch="linux-${CPU_ARCH}";
download_folder="/opt/downloads/gitea/";
download_folder="${BASE_FOLDER}download/";
if [ ! -d "${download_folder}" ]; then
echo "Download folder ${download_folder} missing";
exit;
fi;
target_file="/usr/local/bin/gitea";
if [ ! -f "${target_file}" ]; then
echo "There is no gitea target file at ${target_file}. Is gitea installed?";
exit;
fi;
export arch target_file;