Add all files

This commit is contained in:
Clemens Schwaighofer
2024-03-29 16:50:35 +09:00
commit bfeef66b0b
4 changed files with 59 additions and 0 deletions

23
init.sh Normal file
View File

@@ -0,0 +1,23 @@
CPU_ARCH=""
# get the architecture
_cpu_arch=$(uname -m);
# weg get like x86_64 or x86_32 (NO), aarch64, etc
# we ONLY allow x86_64 or aarch64
# possible add: arm64
if [ "${_cpu_arch}" = "x86_64" ]; then
CPU_ARCH="amd64";
elif [ "${_cpu_arch}" = "aarch64" ]; then
CPU_ARCH="arm64";
else
echo "Not supported architecture: ${_cpu_arch}";
exit;
fi;
arch="linux-${CPU_ARCH}";
download_folder="/opt/downloads/gitea/";
if [ ! -d "${download_folder}" ]; then
echo "Download folder ${download_folder} missing";
exit;
fi;
target_file="/usr/local/bin/gitea";
# __END__