-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcheck_all_vcs
More file actions
executable file
·49 lines (45 loc) · 1.15 KB
/
Copy pathcheck_all_vcs
File metadata and controls
executable file
·49 lines (45 loc) · 1.15 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash -
#===============================================================================
#
# FILE: pull_all_vcs
#
# USAGE: ./pull_all_vcs
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: andreas.boettger@gmx.de
# ORGANIZATION:
# CREATED: Do 24 Apr 2014 12:38:05 CEST
# REVISION: ---
#===============================================================================
# set -o nounset # Treat unset variables as an error
rootDir="$HOME"
if [ "$1" != "" ]
then
rootDir=$(realpath "$1")
fi
red='\e[0;31m'
green='\e[0;32m'
yellow='\e[0;33m'
NC='\e[0m' # No Color
if [ "$(command -v git)" == "" ]
then
echo -e "${red}git not installed${NC}"
else
# GIT source code management system
echo -e "${green}***** Checking GIT repositories in ${yellow}$rootDir${NC}"
echo
find "$rootDir" -type d -name .git | sort | while read line; do
workingDir=$(dirname "$line")
echo -e "${yellow}$workingDir${NC}"
cd "$workingDir"
# echo -e "${green}$(git pull)${NC}"
check=$(git log HEAD..origin)
echo "$check"
echo
done
fi