~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai/aba/commands/tree-source

  • Committer: Robert Collins
  • Date: 2005-09-13 12:39:26 UTC
  • mto: (147.2.6) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20050913123926-b72242bdacc1ae52
create the output directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
## Copyright (C) 2004 Aaron Bentley
 
3
##
 
4
## See the file "COPYING" for further information about
 
5
## the copyright and warranty status of this work.
 
6
 
 
7
. "$abadir/aba-lib"
 
8
 
 
9
# executes the command ("$@" are the arguments after the command name)
 
10
cmd_exec()
 
11
{
 
12
  aba_tree_source;
 
13
  if [ $? -eq 2 ]; then
 
14
    echo "$(basename $0): not in project tree ($(pwd))"
 
15
  fi
 
16
  exit $?
 
17
}
 
18
 
 
19
# one-liner description for aba help
 
20
cmd_desc()
 
21
{
 
22
    aba_desc $(basename $0) "prints the name of the tag-source of the tree"
 
23
}
 
24
 
 
25
# short help for aba command -h, --help
 
26
cmd_help()
 
27
{
 
28
    cat <<EOH
 
29
Prints the name of the revision this tree was tagged from
 
30
usage: $abaname $(basename $0) 
 
31
 
 
32
This command uses data in the patch-logs, and outputs the full revision
 
33
name of the tag source revision.  If no tag source can be found, outputs
 
34
nothing, and exits with status 1.
 
35
 
 
36
It should be suitable for scripting, e.g. merges.
 
37
 
 
38
EOH
 
39
}
 
40
 
 
41
# extended help for aba command -H or aba help command
 
42
cmd_ext_help()
 
43
{
 
44
    cat <<EOH
 
45
If the patch logs have been mutilated, this command may return bad data.
 
46
 
 
47
EOH
 
48
}       
 
49
 
 
50
aba_run "$@"
 
51
# arch-tag: tree-source by Aaron Bentley  (11:33 Mar 09 2004)