Add support for Git submodules
This commit is contained in:
parent
a30b1f33e3
commit
d66db3dd47
|
@ -63,8 +63,8 @@ _git_tests()
|
||||||
#update submodules if any
|
#update submodules if any
|
||||||
[ -f "$tmpdir/repository/.gitmodules" ] &&
|
[ -f "$tmpdir/repository/.gitmodules" ] &&
|
||||||
(cd "$tmpdir/repository" &&
|
(cd "$tmpdir/repository" &&
|
||||||
$GIT submodule init &&
|
$GIT_SUBMODULE init &&
|
||||||
$GIT submodule update)
|
$GIT_SUBMODULE update)
|
||||||
#generate documentation if available
|
#generate documentation if available
|
||||||
(cd "$tmpdir/repository" &&
|
(cd "$tmpdir/repository" &&
|
||||||
$CONFIGURE &&
|
$CONFIGURE &&
|
||||||
|
|
|
@ -32,6 +32,7 @@ PROGNAME_GIT_TESTS="deforaos-git-tests.sh"
|
||||||
CONFIGURE="/usr/local/bin/configure"
|
CONFIGURE="/usr/local/bin/configure"
|
||||||
GIT="git"
|
GIT="git"
|
||||||
GIT_CLONE="$GIT clone -q"
|
GIT_CLONE="$GIT clone -q"
|
||||||
|
GIT_SUBMODULE="$GIT submodule -q"
|
||||||
MAKE="make"
|
MAKE="make"
|
||||||
MKTEMP="mktemp"
|
MKTEMP="mktemp"
|
||||||
RM="/bin/rm -f"
|
RM="/bin/rm -f"
|
||||||
|
@ -54,11 +55,14 @@ _git_tests()
|
||||||
"$GIT_REMOTE/${repository}.git" "$tmpdir"
|
"$GIT_REMOTE/${repository}.git" "$tmpdir"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "$repository: Could not clone" 1>&2
|
echo "$repository: Could not clone" 1>&2
|
||||||
else
|
elif [ -d "$tmpdir/tests" ]; then
|
||||||
|
#update submodules if any
|
||||||
|
[ -f "$tmpdir/repository/.gitmodules" ] &&
|
||||||
|
(cd "$tmpdir/repository" &&
|
||||||
|
$GIT submodule init &&
|
||||||
|
$GIT submodule update)
|
||||||
#run tests if available
|
#run tests if available
|
||||||
if [ -d "$tmpdir/tests" ]; then
|
(cd "$tmpdir" && $CONFIGURE && $MAKE tests) || ret=2
|
||||||
(cd "$tmpdir" && $CONFIGURE && $MAKE tests)|| ret=2
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
#cleanup
|
#cleanup
|
||||||
$RM -r "$tmpdir"
|
$RM -r "$tmpdir"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user