|
|
|
vcs_git() {
|
|
|
|
local reponame="$(basename "$1")"
|
|
|
|
local dir="$dir_source/$name/$reponame"
|
|
|
|
|
|
|
|
if [ ! -d "$dir" ]; then
|
|
|
|
# Clone new repo
|
|
|
|
git clone --recursive --depth=1 "$1" "$dir"
|
|
|
|
cd "$dir"
|
|
|
|
echo "$(git rev-parse @)" > "${dir}_rev_$_satname"
|
|
|
|
vcs_compile=true
|
|
|
|
else
|
|
|
|
cd "$dir"
|
|
|
|
|
|
|
|
git pull > /dev/null
|
|
|
|
local rev="$(git rev-parse @)"
|
|
|
|
if [ "$rev" != "$(cat "${dir}_rev_$_satname" 2> /dev/null || true)" ]; then
|
|
|
|
echo "$rev" > "${dir}_rev_$_satname"
|
|
|
|
vcs_compile=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
version="$(git rev-list HEAD --count)_$(git rev-parse --short HEAD)"
|
|
|
|
cd "$OLDPWD"
|
|
|
|
|
|
|
|
getfile "$reponame"
|
|
|
|
}
|