chiark
/
gitweb
/
~ianmdlvl
/
developers-reference.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Sec "Best practices for maintainer scripts" added, special credit here
[developers-reference.git]
/
common.ent
diff --git
a/common.ent
b/common.ent
index 341e8753e17d98a8923cdc777782defe35b20ac8..1380d83a49302eaedd9c7926669f622544e83784 100644
(file)
--- a/
common.ent
+++ b/
common.ent
@@
-240,3
+240,16
@@
pool/non-free/n/
pool/non-free/n/netscape/
...
</example>">
+
+<!entity example-pathfind '<example>pathfind() {
+ OLDIFS="$IFS"
+ IFS=:
+ for p in $PATH; do
+ if [ -x "$p/$*" ]; then
+ IFS="$OLDIFS"
+ return 0
+ fi
+ done
+ IFS="$OLDIFS"
+ return 1
+}</example>'>