#! /bin/sh

if [ "$1" = "--version" ]
then
cat << EOF
tomoyo-selectpolicy 2.3.0

Copyright (C) 2005-2010 NTT DATA CORPORATION.

This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
EOF
elif [ "$1" = "--help" ]
then
cat << EOF
Usage: tomoyo-selectpolicy [-r] domainname [domainname ...]

This program picks up specified domain's policy from domain policy file.

  -r   Pick up all domains whose domainname starts with domainname given at command line.

Examples:

# tomoyo-selectpolicy -r '<kernel> /usr/sbin/sshd' < /sys/kernel/security/tomoyo/domain_policy
 Pick up domain policy for sshd and its descendent.

EOF
else
cat << EOF | help2man -i - -N -s 8 -n "Pick up TOMOYO Linux's specific domain's policy" $0 | gzip -9 > man8/tomoyo-selectpolicy.8.gz
[SEE ALSO]

 tomoyo-sortpolicy (8)

[NOTES]

 Be sure to quote or escape appropriately when specifying domainnames.

[AUTHORS]

 penguin-kernel _at_ I-love.SAKURA.ne.jp

EOF
fi
exit 0
