changed Files: x
Signed-off-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
01cd7873e1
commit
0b39288176
1 changed files with 4 additions and 1 deletions
5
x
5
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue