Index: ossp-pkg/shtool/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v rcsdiff -q -kk '-r1.199' '-r1.200' -u '/v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v' 2>/dev/null --- ChangeLog 2004/04/07 07:58:14 1.199 +++ ChangeLog 2004/04/21 15:07:41 1.200 @@ -9,6 +9,12 @@ ChangeLog + Changes between 2.0b2 and 2.0b3 (07-Apr-2004 to 21-Apr-2004): + + *) Port "sh.platform" to full POSIX 1003.1-2001 (SUSv3) compliance by + replacing "head -1" with "sed -e 'q'" and "tail -1" with "sed -n -e '$p'". + [Ralf S. Engelschall] + Changes between 2.0b1 and 2.0b2 (17-Feb-2004 to 07-Apr-2004): *) Replace "tr 'x-' 'x_'" with "sed -e 's/-/_/g'" constructs Index: ossp-pkg/shtool/sh.platform RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.platform,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.platform,v' 2>/dev/null --- sh.platform 2004/02/12 16:06:27 1.5 +++ sh.platform 2004/04/21 15:07:41 1.6 @@ -200,7 +200,7 @@ v_kern=`echo "${UNAME_RELEASE}" |\ sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/'` v_libc=`(strings /lib/libc.so.* | grep '^GLIBC_' | sed -e 's/^GLIBC_//' |\ - sort -n | tail -1 | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/') 2>/dev/null` + sort -n | sed -n -e '$p' | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/') 2>/dev/null` ST="GNU/${v_libc}/<${v_kern}>" if [ -f /etc/lsb-release ]; then eval `( . /etc/lsb-release @@ -220,7 +220,7 @@ [ ".${tagfile}" = .x ] && continue [ ! -f "/etc/${tagfile}" ] && continue n=`echo ${tagfile} | sed -e 's/[_-]release$//' -e 's/[_-]version$//'` - v=`(grep VERSION /etc/${tagfile}; cat /etc/${tagfile}) | grep '[0-9]' | head -1 |\ + v=`(grep VERSION /etc/${tagfile}; cat /etc/${tagfile}) | grep '[0-9]' | sed -e 'q' |\ sed -e 's/^/#/' \ -e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' \ -e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' \ @@ -379,7 +379,7 @@ alpha ) AP="Alpha" ;; esac alpha_type=`(/usr/sbin/psrinfo -v) 2>/dev/null |\ - sed -n -e 's/^.*The alpha \([^ ][^ ]*\).*processor.*$/\1/p' | head -n 1` + sed -n -e 's/^.*The alpha \([^ ][^ ]*\).*processor.*$/\1/p' | sed -e 'q'` AT="${AP}${alpha_type}" AC="${AP}" # determine system