|
@ -1,9 +1,17 @@ |
|
|
vcs_svn() { |
|
|
vcs_svn() { |
|
|
|
|
|
local revision='' |
|
|
|
|
|
|
|
|
|
|
|
local OPTIND=1 |
|
|
|
|
|
local opt |
|
|
|
|
|
while getopts 'r:' opt; do case "$opt" in |
|
|
|
|
|
r) local revision="-r $OPTARG" ;; |
|
|
|
|
|
esac; done |
|
|
|
|
|
shift $((OPTIND-1)) |
|
|
|
|
|
[ "$1" = '--' ] && shift |
|
|
|
|
|
|
|
|
local reponame="$(basename "$1")" |
|
|
local reponame="$(basename "$1")" |
|
|
local dir="$dir_source/$name/$reponame" |
|
|
local dir="$dir_source/$name/$reponame" |
|
|
|
|
|
|
|
|
[ "$2" ] && local revision="-r $2" || local revision="" |
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d "$dir" ]; then |
|
|
if [ ! -d "$dir" ]; then |
|
|
# Clone new repo |
|
|
# Clone new repo |
|
|
svn co $revision "$1" "$dir" |
|
|
svn co $revision "$1" "$dir" |
|
@ -18,6 +26,6 @@ vcs_svn() { |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
[ "$2" ] || version="r$(svn info "$dir" --show-item revision | xargs)" |
|
|
[ "$branch" ] || version="r$(svn info "$dir" --show-item revision | xargs)" |
|
|
getfile "$reponame" |
|
|
getfile "$reponame" |
|
|
} |
|
|
} |
|
|