#!/bin/bash
A=
index=0
repos_url=''
get_repos_url() {
echo -n "Please input a repos url:"
read reposURL
repos_url=$reposURL
}
deal_trunk() {
A[$index]="$1/$2"
echo "${1#*$repos_url}"
let "index++"
}
deal_repos() {
list="`svn list $1`"
for sub in ${list}
do
case ${sub} in
branches/)
;;
tags/)
;;
trunk/)
deal_trunk $1 $sub
;;
*)
deal_repos $1/$sub
;;
esac
done
}
get_repos_url
deal_repos $repos_url
echo ${A[@]}