summaryrefslogtreecommitdiff
path: root/ar/.local/bin/gitupdate
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-01 18:26:31 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-01 18:26:31 +0900
commitec89dd779ed67503678a752d2e0e68928183d831 (patch)
tree5e24a62c61cfc6c82ff1507e4b9d542a40b748e9 /ar/.local/bin/gitupdate
parenta9264a650765355014ce172e7b09bdf249f598dd (diff)
modified bin/gitupdate, created bin/webcam
Diffstat (limited to 'ar/.local/bin/gitupdate')
-rwxr-xr-xar/.local/bin/gitupdate19
1 files changed, 2 insertions, 17 deletions
diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate
index fbb6ebe..72c5db6 100755
--- a/ar/.local/bin/gitupdate
+++ b/ar/.local/bin/gitupdate
@@ -72,25 +72,10 @@ repo_root=$(git rev-parse --show-toplevel || echo ".")
cd "$repo_root"
if [ "$repo_root" = "${PASSWORD_STORE_DIR:-${HOME}/.password-store}" ]; then
- if git remote | grep -q "^home$"; then
- # Push to both 'home' and 'origin'
- pass git push home "$branch" && pass git push origin "$branch"
- else
- # Push only to 'origin'
- pass git push origin "$branch"
- fi
+ pass git remote | xargs -L1 pass git push -all
else
- # Pull and rebase before pushing
git pull --rebase origin "$branch"
-
- # Check if the 'home' remote exists
- if git remote | grep -q "^home$"; then
- # Push to both 'home' and 'origin'
- git push home "$branch" && git push origin "$branch"
- else
- # Push only to 'origin'
- git push origin "$branch"
- fi
+ git remote | xargs -L1 git push -all
fi
printf "\n[repo] %s(%s): %s\n" "$(basename "$repo_root")" "$branch" "$message"