Add a base setup script, update all other scripts with better command run
Commands are set as array and run from them (array unbpack)
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# AUTHOR: Clemens Schwaighofer
|
||||
# DATE: 2025/6/27
|
||||
# DESC: create a new basic clone
|
||||
|
||||
REPOSITORY="$1";
|
||||
BRANCH="$2";
|
||||
REMOTE_HOST="$3";
|
||||
@@ -16,8 +20,14 @@ if [ -z "${REMOTE_HOST}" ]; then
|
||||
exit;
|
||||
fi;
|
||||
|
||||
echo "* Validate SSH PEM Key exist and SSH config";
|
||||
# grep "Host ${REMOTE}"
|
||||
# grep "IdentityFile" in this
|
||||
|
||||
echo "New clone";
|
||||
|
||||
echo ${GIT_COMMAND} clone -b "${BRANCH}" --single-branch --depth 1 --origin "${REMOTE}" "${REMOTE_HOST}:${REPOSITORY}" "${GIT_REPOSITORY_FOLDER}${CLONE_BASE}";
|
||||
GIT_COMMAND=("${GIT_COMMAND_BASE[@]}" "clone" "-b" "${BRANCH}" "--single-branch" "--depth" "1" "--origin" "${REMOTE}" "${REMOTE_HOST}:${REPOSITORY}" "${GIT_REPOSITORY_FOLDER}${CLONE_BASE}")
|
||||
echo "Command: ${GIT_COMMAND[*]}"
|
||||
# echo ${GIT_COMMAND_BASE} clone -b "${BRANCH}" --single-branch --depth 1 --origin "${REMOTE}" "${REMOTE_HOST}:${REPOSITORY}" "${GIT_REPOSITORY_FOLDER}${CLONE_BASE}";
|
||||
|
||||
# __END__
|
||||
|
||||
Reference in New Issue
Block a user