File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ COLOR_RED=" \033[0;31m"
4
+ COLOR_GREEN=" \033[0;32m"
5
+ COLOR_BLUE=" \e[36m"
6
+ COLOR_WHITE=" \033[0;37m"
7
+
8
+ clear
9
+
10
+ read_command () {
11
+ while read -p " $: " cmd < /dev/tty
12
+ do
13
+ if [ " $cmd " != " q" ] && [ " $cmd " != " " ];
14
+ then
15
+ break
16
+ fi
17
+ done
18
+ }
19
+
20
+ echo ' This script loops all folders in current directory "' $( pwd) ' " and show git changes.'
21
+ echo ' Do you want to continue?'
22
+ while : ; do
23
+ read_command
24
+
25
+ if [ " $cmd " == " y" ];
26
+ then
27
+ break
28
+ fi
29
+
30
+ if [ " $cmd " == " n" ];
31
+ then
32
+ exit 100
33
+ fi
34
+ done
35
+
36
+
37
+ ls -d * / | while read -r line;
38
+ do
39
+ echo -e " $COLOR_BLUE "
40
+ echo ' Showing git status of folder:' $line
41
+ echo -e " $COLOR_WHITE "
42
+
43
+ exec 3>&1
44
+ exec 1> >( paste /dev/null -)
45
+
46
+ git -C $line status
47
+
48
+ exec 1>&3 3>& -
49
+ done ;
You can’t perform that action at this time.
0 commit comments