gc: indentation
Signed-off-by: Michael Grote <michael.grote@dataport.de>
This commit is contained in:
parent
6c0afe7a41
commit
4bf7a51c46
1 changed files with 25 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--help | -h)
|
--help | -h)
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
|
@ -17,12 +17,17 @@ case "$1" in
|
||||||
michael.grote@posteo.de - git.mgrote.net
|
michael.grote@posteo.de - git.mgrote.net
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
--new-branch | -b)
|
--new-branch | -b)
|
||||||
(git checkout --quiet -b "$2" && echo '>>> Create new branch "'"$2"'"') || (git checkout --quiet "$2" > /dev/null 2>&1 && echo '>>> Branch already exists, checking out... ')
|
(git checkout --quiet -b "$2" && echo '>>> Create new branch "'"$2"'"') || \
|
||||||
|
(git checkout --quiet "$2" > /dev/null 2>&1 && echo '>>> Branch already exists, checking out... ')
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ -n "$1" ] ; then (echo ">>> Try local checkout" && git checkout --quiet "$1" > /dev/null 2>&1) || (echo ">>> Try remote checkout" && git checkout --quiet -b "$1" origin/"$1" > /dev/null 2>&1 || echo ">>> Unkown branch! ")
|
if [ -n "$1" ] ; then
|
||||||
|
(echo ">>> Try local checkout" && git checkout --quiet "$1" > /dev/null 2>&1) || \
|
||||||
|
(echo ">>> Try remote checkout" && git checkout --quiet -b "$1" origin/"$1" > /dev/null 2>&1 || echo ">>> Unkown branch! ")
|
||||||
else
|
else
|
||||||
(git checkout --quiet master > /dev/null 2>&1 && echo '>>> Try checking out master') || (git checkout --quiet main > /dev/null 2>&1 && echo '>>> Try checking out main') || (git checkout --quiet release > /dev/null 2>&1 && echo '>>> Try checking out release')
|
(git checkout --quiet master > /dev/null 2>&1 && echo '>>> Try checking out master') || \
|
||||||
|
(git checkout --quiet main > /dev/null 2>&1 && echo '>>> Try checking out main') || \
|
||||||
|
(git checkout --quiet release > /dev/null 2>&1 && echo '>>> Try checking out release')
|
||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue