new clone fix for repository and remote host options

This commit is contained in:
2025-07-04 13:38:12 +09:00
parent 0e461b039f
commit 2c989eeb08

View File

@@ -15,9 +15,17 @@ BASE_FOLDER=$(dirname "$(readlink -f "$0")")"/";
# shellcheck source=init.sh
. "${BASE_FOLDER}init.sh";
if [ -z "${REPOSITORY}" ]; then
echo "[!] Must set a repository path";
error=1;
fi;
if [ -z "${REMOTE_HOST}" ]; then
echo "[!] Must set a remote host for the repository";
exit;
error=1;
fi;
# if we have an ":" in the repository, split by it and replace it with the remote host
if [[ "${REPOSITORY}" == *":"* ]]; then
REPOSITORY=$(echo "${REPOSITORY}" | cut -d ":" -f 2);
fi;
error=0