vcs_svn() { local reponame="$(basename "$1")" local dir="$dir_source/$name/$reponame" [ "$2" ] && local revision="-r $2" || local revision="" if [ ! -d "$dir" ]; then # Clone new repo svn co $revision "$1" "$dir" echo "$(svn info "$dir" --show-item revision)" > "${dir}_rev_$_satname" vcs_compile=true else svn up $revision "$dir" || true local rev="$(svn info "$dir" --show-item revision)" if [ "$rev" != "$(cat "${dir}_rev_$_satname" 2> /dev/null || true)" ]; then echo "$rev" > "${dir}_rev_$_satname" vcs_compile=true fi fi [ "$2" ] || version="r$(svn info "$dir" --show-item revision | xargs)" getfile "$reponame" }