summaryrefslogtreecommitdiff
path: root/.local/bin/gitpu
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-07-28 12:37:45 -0700
committerxyz <gky44px1999@gmail.com>2021-07-28 12:37:45 -0700
commitb5b8292697f35e9db97011c54666389232a9a578 (patch)
tree50fdd342de09246fb4d917d46439979cbc559756 /.local/bin/gitpu
parentfecc864475b38a94568a283b99dfa45eeded9c93 (diff)
better handle when no args
Diffstat (limited to '.local/bin/gitpu')
-rwxr-xr-x.local/bin/gitpu25
1 files changed, 17 insertions, 8 deletions
diff --git a/.local/bin/gitpu b/.local/bin/gitpu
index b77d8eab..fcc32be9 100755
--- a/.local/bin/gitpu
+++ b/.local/bin/gitpu
@@ -1,10 +1,19 @@
#!/bin/sh
-for dir ; do
- git -C "$dir" checkout master
- git -C "$dir" pull upstream master
- git -C "$dir" push
- git -C "$dir" checkout fly
- git -C "$dir" merge --no-edit master
- git -C "$dir" push
-done
+if [ -z "$1" ]; then
+ git checkout master
+ git pull upstream master
+ git push
+ git checkout fly
+ git merge --no-edit master
+ git push
+else
+ for dir ; do
+ git -C "$dir" checkout master
+ git -C "$dir" pull upstream master
+ git -C "$dir" push
+ git -C "$dir" checkout fly
+ git -C "$dir" merge --no-edit master
+ git -C "$dir" push
+ done
+fi