-
Notifications
You must be signed in to change notification settings - Fork 0
/
repostatus.sh
executable file
·30 lines (23 loc) · 973 Bytes
/
repostatus.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
workspace="grive/git_workspace/"
log=~/$workspace/status.log
cd ~/$workspace
lista="$(ls -d */)"
diretorios=($lista)
echo -e "\n\n\n" >> $log
echo -e "\e[44m>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\e[0m" >> $log
echo " " >> $log
data_atual=$(date '+%d/%m/%Y');
echo "Data: $data_atual" >> $log
hora=$(date '+%H:%M:%S');
echo "Hora: $hora" >> $log
echo " " >> $log
for dir in "${diretorios[@]}"; do
echo -e "\e[45m----------------------------------------------------------------------------------------------------\e[0m "~/${workspace}${dir} >> $log
echo " " >> $log
cd ~/${workspace}${dir}
git status >> $log
echo " " >> $log
done
echo -e "\e[44m<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\e[0m" >> $log
echo -e " " >> $log