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

2
download/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -15,12 +15,16 @@ else
exit; exit;
fi; fi;
arch="linux-${CPU_ARCH}"; arch="linux-${CPU_ARCH}";
download_folder="/opt/downloads/gitea/"; download_folder="${BASE_FOLDER}download/";
if [ ! -d "${download_folder}" ]; then if [ ! -d "${download_folder}" ]; then
echo "Download folder ${download_folder} missing"; echo "Download folder ${download_folder} missing";
exit; exit;
fi; fi;
target_file="/usr/local/bin/gitea"; 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; export arch target_file;