From 67059eb38f66b5d03ebdf871b54680ab091ed311 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 10 Apr 2025 21:28:33 +0200 Subject: [PATCH] wip --- setup/homelapGitSetup.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setup/homelapGitSetup.sh b/setup/homelapGitSetup.sh index bb0016e..851becc 100755 --- a/setup/homelapGitSetup.sh +++ b/setup/homelapGitSetup.sh @@ -67,11 +67,16 @@ gitDirSetup() { git branch -m main - git remote add "$(hostname)" "https://git.k4li.de/homelab/${location}-$(hostname).git" + if git remote add "$(hostname)" "https://git.k4li.de/homelab/${location}-$(hostname).git"; then - git commit -m "Initial script commit" + git add . - git push -u origin main + git commit -m "Initial script commit" + + git push -u origin main + else + echo_error 'Failed setting the git repo up with git remote add "$(hostname)" "https://git.k4li.de/homelab/${location}-$(hostname).git"' + fi } set_cronjob() {