From 0b39288176f30ca0ec9fc525b4b7b647f12ad812 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 21 Jul 2023 18:46:16 +0200 Subject: [PATCH] changed Files: x Signed-off-by: Michael Grote --- x | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x b/x index 8564d31..9f9606a 100644 --- a/x +++ b/x @@ -4,10 +4,11 @@ devices="rb5009.grote.lan,/home/mg/oxidized-selfmade/neu hex.grote.lan,/ssh/keys/hex" GIT_REPO_PATH=/home/mg/oxidized-selfmade +GIT_REPO_BRANCH=master if [ -d "$GIT_REPO_PATH" ]; then cd "$GIT_REPO_PATH" if [ -d ".git" ]; then - git pull origin master + git pull origin $GIT_REPO_BRANCH else echo "Error: The directory exists but is not a Git repository." exit 1 @@ -37,6 +38,8 @@ while read -r fqdn path; do git commit -m "update config_${fqdn}" done <<< "$devices" +git push + # Restore the original IFS value IFS=$OLD_IFS