summaryrefslogtreecommitdiff
path: root/mk/check/check-portability.sh
diff options
context:
space:
mode:
authorrillig <rillig>2006-12-12 21:10:41 +0000
committerrillig <rillig>2006-12-12 21:10:41 +0000
commit6f00a9efe5a4e5fe5cd48eb22466f8da1252b19a (patch)
tree982b238c2dd18f2e1b8be73a074ff75dc049f8b7 /mk/check/check-portability.sh
parent7c26c529bef24a405fc278525da0a862feae8650 (diff)
downloadpkgsrc-6f00a9efe5a4e5fe5cd48eb22466f8da1252b19a.tar.gz
On Solaris 5.9, the ksh cannot handle null bytes in the input. It's
documented in a SunSolve document, but that document is not accessible to the public. There's no better way than to start a subshell executing sed(1) in this case. This makes the test even slower on these machines, and is not even guaranteed to work in all cases. That's life.
Diffstat (limited to 'mk/check/check-portability.sh')
-rw-r--r--mk/check/check-portability.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/mk/check/check-portability.sh b/mk/check/check-portability.sh
index 2db4fbbdbc5..7f5f0024e23 100644
--- a/mk/check/check-portability.sh
+++ b/mk/check/check-portability.sh
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.3 2006/11/09 14:36:18 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.4 2006/12/12 21:10:41 rillig Exp $
#
# This program checks the extracted files for portability issues that
# are likely to result in false assumptions by the package.
@@ -28,13 +28,24 @@ check_shell() {
find * -type f -print 2>/dev/null \
| {
+ opsys=`uname -s`-`uname -r`
while read fname; do
skip=no
eval "case \"\$fname\" in $SKIP_FILTER *.orig) skip=yes;; esac"
[ $skip = no ] || continue
- read firstline < "$fname" || continue
+ case "$opsys" in
+ SunOS-5.9)
+ # See also (if you can):
+ # http://sunsolve.sun.com/search/document.do?assetkey=1-1-4250902-1
+ firstline=`sed 1q < "$fname"`
+ ;;
+
+ *) read firstline < "$fname" || continue
+ ;;
+ esac
+
case "$firstline" in
"#!"*"/bin/sh")
check_shell "$fname"