Magellan Linux

Contents of /trunk/pkgtools/svn-tag.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1331 - (show annotations) (download) (as text)
Tue May 31 17:44:01 2011 UTC (12 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 549 byte(s)
-sync with current
1 #!/bin/bash
2 export LC_ALL=C
3
4 usage()
5 {
6 echo "Usage: $(basename $0) TAG [MESSAGE]"
7 echo
8 echo "Message is optional, you must run this script within a svn tree."
9 echo
10 exit 1
11 }
12
13 TAG="$1"
14 MESSAGE="$2"
15 [[ -z ${TAG} ]] && usage
16 [[ -z ${Message} ]] && MESSAGE="tagged '${TAG}'"
17
18 URI="$(svn info | grep 'URL:' | cut -d' ' -f2)"
19 [[ $? -ne 0 ]] && usage
20 REPO_ROOT="$(svn info | grep 'Repository Root:' | cut -d' ' -f3)"
21 [[ $? -ne 0 ]] && usage
22
23 echo "tagging ${URI} with '${TAG}'..."
24 svn copy -m "${MESSAGE}" "${URI}" "${REPO_ROOT}/${SUBDIR}/tags/${TAG}"

Properties

Name Value
svn:keywords Id