Last active
April 26, 2017 15:17
-
-
Save meoso/54c1cb22f114dd3fd2da4c1f7eb9c602 to your computer and use it in GitHub Desktop.
show git status for all local repos found under given path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
###################################################################### | |
# purpose : show git status for all local repos found under given path | |
# author : njd | |
# created : 2017-Apr-21 | |
# usage : ./all-git-status.sh [path] [| less -r] | |
###################################################################### | |
ESC="\033" | |
NORMAL="$ESC[m" | |
DULL=0 | |
BRIGHT=1 | |
FG_CYAN=36 | |
CYAN="$ESC[${DULL};${FG_CYAN}m" | |
if [ "$1" == "" ] | |
then | |
FS=$(pwd) | |
else | |
FS=$1 | |
fi | |
find "$FS" -type d -name ".git" -exec echo -e "\n${CYAN}{}${NORMAL}" \; -exec git -C "{}/.." status --short --branch \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment