On Wed, 2007-03-14 at 22:09 +0000, Julian Gilbey wrote:
> On Wed, Mar 14, 2007 at 08:17:31PM +0000, Adam D. Barratt wrote:
> > I've attached my current revision of the script, which
> > steals^Wincorporates some of the changes from your revision. My version
> > adds a dependency on find, although that's not a huge problem given that
> > findutils is Essential: yes. It also has the advantages (imho) of only
> > checking executable files in the given paths and avoiding the need to
> > special-case /usr/bin/X11.
> 
> The special-casing of /usr/bin/X11 is better than find, since we want
> also to catch missing manpages for symlinks, eg debc is a symlink to
> debi, but both require manpages.

That was the intention of using -xtype in the find invocation;
unfortunately it also matched symlinks that didn't point to an
executable file. It should have been:

for F in $(find "$@" -follow -type f -perm /0111 -printf '%f ' \
    2>/dev/null); do

(i.e. files that are executable or symlinks whose targets are files that
are executable).

After temporarily breaking my system:

[EMAIL PROTECTED]:~$ ls -l /usr/bin/deb[ci]
-rwxr-xr-x 1 root root 13569 2006-12-04 08:28 /usr/bin/debi
lrwxrwxrwx 1 root root     4 2006-12-30 17:25 /usr/bin/debc -> debi

[EMAIL PROTECTED]:~$ ls-l /usr/share/man/man1/deb[ci].1.gz
-rw-r--r-- 1 root root 2319 2006-12-04 08:28 /usr/share/man/man1/debi.1.gz

[EMAIL PROTECTED]:~$ manpage-alert.sh /usr/bin/
No manual entry for debc

Personally I still prefer the find solution, but it really depends how
we want to handle non-executable files located in the folders being
traversed.

Adam


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to