This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
dealing with catdir in postinstall
- From: Joshua Daniel Franklin <joshuadfranklin at yahoo dot com>
- To: cygwin-apps at cygwin dot com
- Date: Wed, 25 Feb 2004 18:05:05 -0800 (PST)
- Subject: dealing with catdir in postinstall
I've been rewriting cygwin-doc's postinstall to remove the
bash-specific syntax and came up with this script
to take care of removing (possibly stale) preformatted man
pages. I was thinking that this is a possible problem for
any packages that include man pages, and so maybe it would
be best to come up with something like _update_info_dir.
Unfortunately it would be complicated, unless we did something
like "remove all preformatted pages after any update",
or somehow kept a list of updated packages to zgrep for man
pages.
Anyway here is the script for anyone with man pages:
#!/bin/sh
PACKAGE=cygwin-doc
for LOC in /usr/man/cat /usr/share/man/cat /var/cache/man/cat; do
if [ -d ${LOC}1 -o -d ${LOC}3 ]; then
# should be only one catdir, so this should only happen once
for PAGE in $(/bin/zgrep 'man' /etc/setup/${PACKAGE}.lst.gz |\
/bin/sed -e 's;^usr/share/man/man;;'); do
if [ -f ${LOC}${PAGE} ]; then
/bin/rm -f ${LOC}${PAGE}
fi
done
fi
done
exit 0
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools