#! /bin/sh

if [ "$1" = "--version" ]
then
cat << EOF
ccs-patternize 1.6.4

Copyright (C) 2005-2008 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: ccs-patternize pattern [pattern ...] < list_of_pathnames > new_list_of_pathnames

This program reads domain policy from standard input and replaces pathnames with patterns if the pathname matches to patterns given at commandline and writes to standard output.

Pathnames that contains execute permission and domainnames won't be patterned.

Examples:

# ccs-patternize '/tmp/php\?\?\?\?\?\?' < /etc/ccs/domain_policy.conf > /etc/ccs/domain_policy2.conf
 Replace pathnames that matches to /tmp/php\?\?\?\?\?\? pattern.

EOF
else
cat << EOF | help2man -i - -N -s 8 -n "Convert TOMOYO Linux's pathnames into patterns" $0 | gzip -9 > man8/ccs-patternize.8.gz
[SEE ALSO]

 ccs-findtemp (8)

[NOTES]

 This is a symbolic link to /usr/lib/ccs/patternize .

[AUTHORS]

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

EOF
fi
exit 0
