I am writing a script which will add a new project in the repository, based on the name supplied by the user. Part of this involves checking that an url with the same name does
I face the above problem and i tried all the way. not work for me.. if we access svn with a path not in svn it's failed with error and the shell script will break.
Instead of accessing unknown path, what i did is get the directory list of parent folder and check whether matching one contain or not.
Get all the projects form your Parent directory (if you want to find a specific tags then your parent directory path should be https://developernetwork.repo.net/svn/Projects/Calculator/tags
)
projects=$(svn ls https://developernetwork.repo.net/svn/Projects/)
then check your project folder exists. Remember to add /
after your project name.
projectName="Calculator/"
for i in $projects; do
if [ "$i" == "$projectName/" ];
then
echo Project Exist
else
echo Project does not exist
fi
done
simple.