#!/bin/sh

run () {
	echo " * Running $1"
	sh -c "$1"
}

DEBTAGS=tools/debtags

run "$DEBTAGS tagcat | wc -l"
run "$DEBTAGS tagshow use::editing"
run "$DEBTAGS tagsearch edit"
run "$DEBTAGS show debtags"
run "$DEBTAGS related -d 3 debtags"
run "$DEBTAGS cat | wc -l"
run "$DEBTAGS cat --group | wc -l"
run "$DEBTAGS search use::editing | wc -l"
run "$DEBTAGS search --invert use::editing | wc -l"
run "$DEBTAGS grep use::editing | wc -l"
run "$DEBTAGS grep --invert use::editing | wc -l"
run "$DEBTAGS grep --group use::editing | wc -l"
run "$DEBTAGS grep --group --invert use::editing | wc -l"
run "$DEBTAGS maintainers | wc -l"
run "$DEBTAGS maintainers --group | wc -l"
#  tag [add <package> <tags...>
#  tag [rm  <package> <tags...>
#  tag [ls  <package>
#                View and edit the tags for a package
#  todo          Print a list of the installed packages that are not yet tagged
#  score         Score uninstalled packages according to how often their tags
#                appear in the packages that are installed already
#  facetcoll     Print the tagged collection where each package is tagged with
#                its facets only
#  stats         Print statistics about Debtags
#  todoreport    Print a report of packages needing work
#  ssearch <word [word1 [+tag [-tag1 ...]]]>
#                Perform a keyword search integrated with related packages.
#                A + prefix indicates a wanted tag.  A - prefix indicates
#                an unwanted tag.  Other words indicate keywords to search.
#                Remember to use '--' before unwanted tags to avoid to have
#                them interpreted as commandline switches.


#
# Untested:
#
# update        Updates the package tag database (requires root)
# check <file>	 Check that all the tags in the given tagged collection are present
#               in the tag vocabulary.  Checks the main database if no file is
#               specified
# install [-v] [-q] <tag expression>
#               apt-get install the packages that match the given tag expression
# mkpatch [filename]
#               Create a tag patch between the current tag database and the tag
#               collection [filename]
# submit [patch]
#               Mail the given patch file to the central tag repository.
#               If [patch] is omitted, mail the local tag modifications.
