diff options
author | xyz <gky44px1999@gmail.com> | 2021-07-28 12:37:45 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-07-28 12:37:45 -0700 |
commit | b5b8292697f35e9db97011c54666389232a9a578 (patch) | |
tree | 50fdd342de09246fb4d917d46439979cbc559756 /.local/bin/gitpu | |
parent | fecc864475b38a94568a283b99dfa45eeded9c93 (diff) |
better handle when no args
Diffstat (limited to '.local/bin/gitpu')
-rwxr-xr-x | .local/bin/gitpu | 25 |
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 |