bash: fix git-script linter errors
Signed-off-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
5927a331a0
commit
91aebe2017
2 changed files with 6 additions and 3 deletions
|
@ -1,2 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC2063
|
||||||
git branch | grep -v "*" | grep -v master | grep -v main | xargs git branch -D ; git fetch --prune
|
git branch | grep -v "*" | grep -v master | grep -v main | xargs git branch -D ; git fetch --prune
|
||||||
|
|
|
@ -13,13 +13,14 @@ function update {
|
||||||
if [ -e "$d/.ignore" ]; then
|
if [ -e "$d/.ignore" ]; then
|
||||||
echo -e "\n${HIGHLIGHT}Ignoring $d${NORMAL}"
|
echo -e "\n${HIGHLIGHT}Ignoring $d${NORMAL}"
|
||||||
else
|
else
|
||||||
cd $d > /dev/null
|
cd "$d" || exit > /dev/null
|
||||||
if [ -d ".git" ]; then
|
if [ -d ".git" ]; then
|
||||||
echo -e "\n${HIGHLIGHT}Updating pwd$NORMAL"
|
echo -e "\n${HIGHLIGHT}Updating pwd$NORMAL"
|
||||||
git add .
|
git add .
|
||||||
git stash
|
git stash
|
||||||
git pull
|
git pull
|
||||||
else
|
else
|
||||||
|
# shellcheck disable=SC2035
|
||||||
scan *
|
scan *
|
||||||
fi
|
fi
|
||||||
cd .. > /dev/null
|
cd .. > /dev/null
|
||||||
|
@ -30,12 +31,13 @@ function update {
|
||||||
|
|
||||||
function scan {
|
function scan {
|
||||||
#echo "pwd"
|
#echo "pwd"
|
||||||
for x in $*; do
|
for x in "$@"; do
|
||||||
update "$x"
|
update "$x"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$1" != "" ]; then cd $1 > /dev/null; fi
|
if [ "$1" != "" ]; then cd "$1" || exit > /dev/null; fi
|
||||||
|
|
||||||
echo -e "${HIGHLIGHT}Scanning ${PWD}${NORMAL}"
|
echo -e "${HIGHLIGHT}Scanning ${PWD}${NORMAL}"
|
||||||
|
# shellcheck disable=SC2035
|
||||||
scan *
|
scan *
|
||||||
|
|
Loading…
Reference in a new issue