2
## Copyright (C) 2004 Jan Hudec
4
## See the file "COPYING" for further information about
5
## the copyright and warranty status of this work.
9
# one-liner description for aba help
11
aba_desc cvs-syn-inventory "Add/remove files acoording to CVS trunk."
14
# short help for aba command -h, --help
17
aba cvs-sync-inventory [dir]
18
Look in CVS/Entries for files CVS knows about, add all files to arch and
19
remove files, that ceased to exist.
23
# extended help for aba command -H or aba help command
34
aw_cvs_process_diff () {
38
if ! test -r "${line#< }"; then
39
log "Removing \"${line#<}\""
40
tla remove "${line#< }" || true
43
log "Adding \"${line#> }\""
44
tla add "${line#> }" || true
50
# executes the command ("$@" are the arguments after the command name)
52
test -n "$1" && { cd "$1" || { echo "* Can't cd to $1" >&2; exit 1; } }
53
cd $(tla tree-root) || exit 1
54
log "Generating CVS inventory"
55
aba cvs-inventory > ,,inventory$$.cvs
56
log "Generating TLA inventory"
57
tla inventory -s -B > ,,inventory$$.tla
58
sort -u ,,inventory$$.cvs -o ,,inventory$$.cvs
59
sort -u ,,inventory$$.tla -o ,,inventory$$.tla
60
diff ,,inventory$$.tla ,,inventory$$.cvs | aw_cvs_process_diff
61
rm ,,inventory$$.cvs ,,inventory$$.tla
65
# arch-tag: 03097d92-2a99-4a3d-9bd2-2a324e2e607f