4 if [ $# -lt "$ARGS" ]; then
5 echo Not enough arguments.
6 echo Example
\"\
<this
script\
> status
\" for \"git-status
\" - git-modules status
10 initializeSubModule
() {
11 if [ ! -d "$1"/.git
]; then
12 echo Initializing and updating
"$1"
13 git-submodule init
"$1"; git-submodule update
"$1"
19 dir_path
="$current_dir:$dir_path"
20 initializeSubModule
"$1"
22 echo Working
in mod
$1 @
`pwd` with
$2
24 if [ -f .gitmodules
]; then
25 for mod_path
in `grep "path =" .gitmodules | awk '{print $3}'`; do
26 traverseModule
"$mod_path" "$2"
29 old_dir
=$
(echo $dir_path | cut
-d':' -f1-1)
30 length_old_dir
=`expr "$old_dir" : '.*'`
32 index
=$
(echo "$length_old_dir+2" |
bc)
33 dir_path
=`echo $dir_path $index | awk '{print substr($1, $2)}'`
38 dir_path
="$current_dir:$dir_path"
39 initializeSubModule
"$1"
41 echo Working
in mod
$1 @
`pwd`
42 if [ -f .gitmodules
]; then
43 for mod_path
in `grep "path =" .gitmodules | awk '{print $3}'`; do
44 initSubModules
"$mod_path"
47 old_dir
=$
(echo $dir_path | cut
-d':' -f1-1)
48 length_old_dir
=`expr "$old_dir" : '.*'`
50 index
=$
(echo "$length_old_dir+2" |
bc)
51 dir_path
=`echo $dir_path $index | awk '{print substr($1, $2)}'`
56 echo Project Home
: $project_home
57 if [ -d $project_home/.git
/ ]; then
62 if [ `expr index "$arg" ' '` -gt 0 ]; then
65 command_arguments
="$command_arguments $arg"
67 echo GIT Command git-
$git_command with arguments\
($#\
) "$command_arguments"
68 main_command
="git-$git_command $command_arguments"
70 if [ -f .gitmodules
]; then
71 for mod_path
in `grep "path =" .gitmodules | awk '{print $3}'`; do
72 traverseModule
$mod_path "$main_command"
76 echo $project_home not a git repo thus exiting