~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai/aba/commands/help

  • Committer: Robert Collins
  • Date: 2005-09-13 10:46:27 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-20050913104627-51f938950a907475
handle inaccessible sibling archives somewhat - note version-0 is still not handled

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
allhelp()
 
9
{
 
10
#  tla help "$@" | head -n -1
 
11
#  tla help "$@" 
 
12
  aba_omit_last 1 tla help "$@"
 
13
  echo "* External aba Commands"
 
14
  echo 
 
15
  externhelp
 
16
  echo
 
17
  echo
 
18
  echo Use aba command -h for help on \`command\', or aba help command for detailed help
 
19
}
 
20
 
 
21
 
 
22
externhelp()
 
23
{
 
24
  for c in ~/.aba/commands/*; do
 
25
    test -x "$c" && "$c" desc
 
26
  done 2>/dev/null
 
27
 
 
28
    for c in "$abadir/commands"/*; do
 
29
      if [ ! -x ~/.aba/commands/"$(basename $c)" ] && [ -x "$c" ]; then
 
30
        "$c" desc
 
31
      fi
 
32
    done 2>/dev/null
 
33
}
 
34
case "$1" in
 
35
  "exec" )
 
36
    if [ -n "$2" ]; then 
 
37
      if [ $2 = "--ext" ]; then 
 
38
        externhelp
 
39
      else
 
40
        aba $2 -H
 
41
      fi
 
42
    else allhelp
 
43
  fi
 
44
  ;;
 
45
  "desc" )
 
46
  ;;
 
47
esac
 
48
# arch-tag: help by Aaron Bentley (12:17 Jan 15, 2004)