dealing with catdir in postinstall
Joshua Daniel Franklin
joshuadfranklin@yahoo.com
Thu Feb 26 02:05:00 GMT 2004
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
More information about the Cygwin-apps
mailing list