From b5b8292697f35e9db97011c54666389232a9a578 Mon Sep 17 00:00:00 2001 From: xyz Date: Wed, 28 Jul 2021 12:37:45 -0700 Subject: better handle when no args --- .local/bin/gitpu | 25 +++++++++++++++++-------- .local/bin/qmmi | 24 ++++++++++++++++++++---- 2 files changed, 37 insertions(+), 12 deletions(-) (limited to '.local') 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 diff --git a/.local/bin/qmmi b/.local/bin/qmmi index 9427ea24..328f36e6 100755 --- a/.local/bin/qmmi +++ b/.local/bin/qmmi @@ -1,5 +1,21 @@ -#/bin/sh +#!/bin/sh + +foo () +{ + qmake + make -B + sudo make install +} + +origin="$PWD" + +if [ -z "$1" ]; then + foo +else + for dir ; do + cd "$dir" || exit 1 + foo + cd "$origin" || exit 1 + done +fi -qmake -make -B -sudo make install -- cgit v1.2.3-70-g09d2