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-inventory "Inventory from CVS/Entries files"
14
# short help for aba command -h, --help
17
aba cvs-inventory [dir]
18
Generate inventory listing from CVS/Entries files."
22
# extended help for aba command -H or aba help command
26
This command processes CVS metafiles and generates CVS analog of
27
tla inventory --both --sources
31
aw_cvs_cat_patterns () {
32
sed -n 's/\([\\|.+()]\)/\\\1/g;s/*/.*/g;s/?/./g;/./p' < $1
35
aw_cvs_cat_entries () {
36
base=${1%CVS/Entries} # Strip
37
base=${base#./} # Normalize
38
sed -n "s:[^/]*/\([^/]*\).*:$base\1:p" < $1
39
cat <<END-OF-CVS-METAS
45
if [ -r "$1.Log" ]; then
46
sed -n "s:[^/]*/\([^/]*\).*:$base\1:p" < "$1.Log"
47
cat <<END-OF-CVS-METAS
48
${base}CVS/Entries.Log
53
aw_cvs_cat_all_entries () {
55
aw_cvs_cat_entries "$line"
59
aw_cvs_tla_inventory () {
63
# executes the command ("$@" are the arguments after the command name)
65
test -n "$1" && { cd "$1" || { echo "* Can't chdir to $1" >&2; exit 1; } }
66
find -path '*/CVS/Entries' | aw_cvs_cat_all_entries
70
# arch-tag: 86262ef1-e994-461c-b608-b47cbdf45fe2