~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai/aba/commands/partial-mirror

  • Committer: Aaron Bentley
  • Date: 2005-08-17 16:18:19 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050817161819-b2f1d02352df0dae
Shelve: Abstracted out filename selection and root-finding

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
 
  mirrors=$(aba mirrors --local $1)
13
 
  for archive in $mirrors; do
14
 
    versions=$(aba package-versions --library --revisions $archive)
15
 
    for version in $versions; do
16
 
      echo Mirroring $archive/$version
17
 
      tla archive-mirror $archive-SOURCE $archive $version
18
 
    done
19
 
  done
20
 
}
21
 
 
22
 
# one-liner description for aba help
23
 
cmd_desc()
24
 
{
25
 
    aba_desc $(basename $0) "Updates mirrors for revisions in library"
26
 
}
27
 
 
28
 
# short help for aba command -h, --help
29
 
cmd_help()
30
 
{
31
 
    cat <<EOH
32
 
Updates mirrors for revisions in library
33
 
usage: $abaname $(basename $0) [archive]
34
 
 
35
 
This script allows local mirrors to act a little more like caches.  We assume
36
 
that the user is interested in those revisions that are present in the revision
37
 
library.  So any versions for local mirrors that have revisions in the library
38
 
are updated from their sources.
39
 
 
40
 
EOH
41
 
}
42
 
 
43
 
# extended help for aba command -H or aba help command
44
 
cmd_ext_help()
45
 
{
46
 
    cat <<EOH
47
 
EOH
48
 
}       
49
 
 
50
 
aba_run "$@"
51
 
#  arch-tag: partial-mirror by Aaron Bentley  (10:40 Apr 26 2004)