1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#! /bin/sh
## Copyright (C) 2004 Aaron Bentley
##
## See the file "COPYING" for further information about
## the copyright and warranty status of this work.
. "$abadir/aba-lib"
# executes the command ("$@" are the arguments after the command name)
cmd_exec()
{
options="remote local"
. "$abadir/getopt"
if [ -z "$remote" ] && [ -z "$local" ]; then
remote="yes"
local="yes"
fi
if [ -n "$local" ]; then archm '-SOURCE' $1; fi
if [ -n "$remote" ]; then archm '-MIRROR' $1; fi
}
archm()
{
tla archives --names $2|grep -- $1|sed -e "s/$1//"
}
# one-liner description for aba help
cmd_desc()
{
aba_desc $(basename $0) "lists all archives which have mirrors"
}
# short help for aba command -h, --help
cmd_help()
{
cat <<EOH
lists all archives which have mirrors
usage: $abaname $(basename $0) [options] [search regular expression]
-h, --help Display a help message and exit.
-H Display a verbose help message and exit.
--remote Display archives that have remote mirrors (have -SOURCE)
--local Display archives that have local mirrors (have -MIRROR)
Print a list of registered archives which have known mirrors.
if [search regex] is given then only archives with names that match.
[search regex] will be shown
EOH
}
# extended help for aba command -H or aba help command
cmd_ext_help()
{
cat <<EOH
EOH
}
aba_run "$@"
# arch-tag: mirrors by Aaron Bentley (20:32 Feb 25 2004)
|