changed Files: x

Signed-off-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2023-07-21 18:46:16 +02:00
parent 01cd7873e1
commit 0b39288176
No known key found for this signature in database
GPG key ID: 4D4C2CD4AE7F095E

5
x
View file

@ -4,10 +4,11 @@
devices="rb5009.grote.lan,/home/mg/oxidized-selfmade/neu devices="rb5009.grote.lan,/home/mg/oxidized-selfmade/neu
hex.grote.lan,/ssh/keys/hex" hex.grote.lan,/ssh/keys/hex"
GIT_REPO_PATH=/home/mg/oxidized-selfmade GIT_REPO_PATH=/home/mg/oxidized-selfmade
GIT_REPO_BRANCH=master
if [ -d "$GIT_REPO_PATH" ]; then if [ -d "$GIT_REPO_PATH" ]; then
cd "$GIT_REPO_PATH" cd "$GIT_REPO_PATH"
if [ -d ".git" ]; then if [ -d ".git" ]; then
git pull origin master git pull origin $GIT_REPO_BRANCH
else else
echo "Error: The directory exists but is not a Git repository." echo "Error: The directory exists but is not a Git repository."
exit 1 exit 1
@ -37,6 +38,8 @@ while read -r fqdn path; do
git commit -m "update config_${fqdn}" git commit -m "update config_${fqdn}"
done <<< "$devices" done <<< "$devices"
git push
# Restore the original IFS value # Restore the original IFS value
IFS=$OLD_IFS IFS=$OLD_IFS