15 |
[[ -z ${BRANCH} ]] && usage |
[[ -z ${BRANCH} ]] && usage |
16 |
[[ -z ${Message} ]] && MESSAGE="created branch '${BRANCH}'" |
[[ -z ${Message} ]] && MESSAGE="created branch '${BRANCH}'" |
17 |
|
|
18 |
URI="$(svn info | grep 'URL:' | cut -d' ' -f2)" |
URI="$(svn info | grep '^URL:' | cut -d' ' -f2)" |
19 |
[[ $? -ne 0 ]] && usage |
[[ $? -ne 0 ]] && usage |
20 |
REPO_ROOT="$(svn info | grep 'Repository Root:' | cut -d' ' -f3)" |
REPO_ROOT="$(svn info | grep 'Repository Root:' | cut -d' ' -f3)" |
21 |
[[ $? -ne 0 ]] && usage |
[[ $? -ne 0 ]] && usage |
22 |
|
|
23 |
echo "creating branch ${URI} with '${BRANCH}'..." |
echo "creating branch ${URI} with '${BRANCH}'..." |
24 |
svn copy -m "${MESSAGE}" "${URI}" "${REPO_ROOT}/branches/${BRANCH}" |
svn copy -m "${MESSAGE}" "${URI}" "${REPO_ROOT}/${SUBDIR}/branches/${BRANCH}" |