Check that an svn repository url does not exist

后端 未结 6 1155
别那么骄傲
别那么骄傲 2021-02-01 12:47

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

6条回答
  •  长发绾君心
    2021-02-01 13:53

    Like @A Scott says, the echo $? can't be used to know wether the URL is correct (I'm on Mac OS 10.11 and SVN client 1.9.5).

    For potential future readers, i use this workaround :

    content=$(svn info $SVN_TAG_URL)
    
    if [[ -z $content ]]; then
        echo "The SVN URL doesn't exist"; exit
    fi
    

提交回复
热议问题