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:
2
download/.gitignore
vendored
Normal file
2
download/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
6
init.sh
6
init.sh
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user