modified
This commit is contained in:
@@ -8,10 +8,11 @@ set -e
|
|||||||
# Directory variables
|
# Directory variables
|
||||||
CURRENT_DIR="${PWD}"
|
CURRENT_DIR="${PWD}"
|
||||||
VOLUMES_DIR="${CURRENT_DIR}/volumes"
|
VOLUMES_DIR="${CURRENT_DIR}/volumes"
|
||||||
CONFIG_REPO_DIR="$(mktemp -d)"
|
TEMP_DIR="$(mktemp -d ./temp.XXXXXX)"
|
||||||
|
|
||||||
|
|
||||||
# Combined Git clone command
|
# Combined Git clone command
|
||||||
GIT_COMMAND="sudo git clone -b funmaps ssh://git@git.zinomedia.de:222/zino/lgsm-csserver.git ${CONFIG_REPO_DIR}"
|
GIT_COMMAND="sudo git clone -b funmaps ssh://git@git.zinomedia.de:222/zino/lgsm-csserver.git ${TEMP_DIR}"
|
||||||
|
|
||||||
# Function to display [INFO] in blue and the message in default color
|
# Function to display [INFO] in blue and the message in default color
|
||||||
info() {
|
info() {
|
||||||
@@ -20,14 +21,14 @@ info() {
|
|||||||
|
|
||||||
# Function to clone and merge configuration repository
|
# Function to clone and merge configuration repository
|
||||||
clone_and_merge_config() {
|
clone_and_merge_config() {
|
||||||
info "Cloning configuration repository to ${CONFIG_REPO_DIR}..."
|
info "Cloning configuration repository to ${TEMP_DIR}..."
|
||||||
${GIT_COMMAND}
|
${GIT_COMMAND}
|
||||||
|
|
||||||
info "Merging configuration from ${CONFIG_REPO_DIR} to ${VOLUMES_DIR}..."
|
info "Merging configuration from ${TEMP_DIR} to ${VOLUMES_DIR}..."
|
||||||
sudo rsync -a "${CONFIG_REPO_DIR}/" "${VOLUMES_DIR}/"
|
sudo rsync -a "${TEMP_DIR}/" "${VOLUMES_DIR}/"
|
||||||
|
|
||||||
info "Removing configuration repository from ${CONFIG_REPO_DIR}..."
|
info "Removing configuration repository from ${TEMP_DIR}..."
|
||||||
sudo rm -rf "${CONFIG_REPO_DIR}"
|
sudo rm -rf "${TEMP_DIR}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main deployment process
|
# Main deployment process
|
||||||
|
|||||||
Reference in New Issue
Block a user