Annotation of /trunk/pkgtools/svn-tag.sh
Parent Directory | Revision Log
Revision 821 -
(hide annotations)
(download)
(as text)
Fri Apr 24 19:17:49 2009 UTC (15 years, 5 months ago) by niro
File MIME type: application/x-sh
File size: 539 byte(s)
Fri Apr 24 19:17:49 2009 UTC (15 years, 5 months ago) by niro
File MIME type: application/x-sh
File size: 539 byte(s)
-added svn related tools
1 | niro | 821 | #!/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}/tags/${TAG}" |
Properties
Name | Value |
---|---|
svn:keywords | Id |