add error overview to rgit util
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
|
||||
bold=$(tput bold)
|
||||
normal=$(tput sgr0)
|
||||
red=$(tput setaf 1)
|
||||
|
||||
find -mindepth 1 -maxdepth 1 -type d | sort | while read file; do
|
||||
export repos_with_error=()
|
||||
|
||||
while read file; do
|
||||
git -C "$file" rev-parse &> /dev/null
|
||||
code=$?
|
||||
|
||||
@@ -13,7 +16,16 @@ find -mindepth 1 -maxdepth 1 -type d | sort | while read file; do
|
||||
|
||||
if (( "$#" > 0 )); then
|
||||
git -C "$file" "$@"
|
||||
if [ $? != 0 ]; then
|
||||
repos_with_error+=("$repo")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done < <(find -mindepth 1 -maxdepth 1 -type d | sort)
|
||||
|
||||
if [ ${#repos_with_error[@]} != 0 ]; then
|
||||
echo -e "\n${bold}${red}Fehler in folgenden Verzeichnissen:${normal}"
|
||||
for repo in "${repos_with_error[@]}"; do
|
||||
echo " - ${red}${repo}${normal}"
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user