|
|
|
vcs_svn() {
|
|
|
|
local revision=''
|
|
|
|
local setver=true
|
|
|
|
|
|
|
|
local OPTIND=1
|
|
|
|
local opt
|
|
|
|
while getopts 'Vr:' opt; do case "$opt" in
|
|
|
|
V) local setver=false ;;
|
|
|
|
r) local revision="-r $OPTARG" ;;
|
|
|
|
esac; done
|
|
|
|
shift $(expr $OPTIND - 1)
|
|
|
|
[ "$1" = '--' ] && shift || true
|
|
|
|
|
|
|
|
local reponame="$(basename "$1")"
|
|
|
|
local dir="$dir_source/$name/$reponame"
|
|
|
|
|
|
|
|
if [ ! -d "$dir" ]; then
|
|
|
|
# Clone new repo
|
|
|
|
svn co $revision "$1" "$dir"
|
|
|
|
echo "$(svn info "$dir" --show-item revision)" > "${dir}_rev_$name_sat"
|
|
|
|
vcs_compile=true
|
|
|
|
else
|
|
|
|
svn up $revision "$dir" || true
|
|
|
|
local rev="$(svn info "$dir" --show-item revision)"
|
|
|
|
if [ "$rev" != "$(cat "${dir}_rev_$name_sat" 2> /dev/null || true)" ]; then
|
|
|
|
echo "$rev" > "${dir}_rev_$name_sat"
|
|
|
|
vcs_compile=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ "$setver" = true ] && version="r$(svn info "$dir" --show-item revision | xargs)" || true
|
|
|
|
getfile "$reponame"
|
|
|
|
}
|