Index: ossp-pkg/platform/platform.sh RCS File: /v/ossp/cvs/ossp-pkg/platform/platform.sh,v rcsdiff -q -kk '-r1.6' '-r1.7' -u '/v/ossp/cvs/ossp-pkg/platform/platform.sh,v' 2>/dev/null --- platform.sh 2003/09/09 09:24:32 1.6 +++ platform.sh 2003/09/11 17:59:34 1.7 @@ -357,17 +357,20 @@ 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>&1` + sort -n | tail -1 | 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 - echo "SC=\"LSB${LSB_VERSION}\"" - echo "SP=\"${DISTRIB_ID} ${DISTRIB_RELEASE}\"" + echo "SC=\"LSB${LSB_VERSION}\"" + echo "SP=\"${DISTRIB_ID} ${DISTRIB_RELEASE}\"" ) 2>/dev/null` fi if [ ".$SP" = . ]; then - for tagfile in dummy `cd /etc && echo *[_-]release *[_-]version 2>/dev/null`; do - test ! -f /etc/${tagfile} && continue + for tagfile in x `cd /etc && \ + /bin/ls *[_-]release *[_-]version 2>/dev/null | \ + sed -e '/redhat-release/d'; echo redhat-release`; do + [ ".${tagfile}" = .x ] && continue + [ ! -f "/etc/${tagfile}" ] && continue n=`echo ${tagfile} | sed -e 's/[_-]release$//' -e 's/[_-]version$//'` v=`cat /etc/${tagfile} | grep '[0-9]' | head -1 |\ sed -e 's/^/#/' \ @@ -379,11 +382,12 @@ debian ) n="Debian[ GNU/Linux]" ;; redhat ) n="RedHat[ Linux]" ;; suse ) n="SuSE[ Linux]" ;; - mandrake ) n="Mandrake[ Linux}" ;; + mandrake ) n="Mandrake[ Linux]" ;; gentoo ) n="Gentoo[ Linux]" ;; * ) n="${n}[ GNU/Linux]" ;; esac SP="$n $v" + break done fi [ ".$SP" = . ] && SP="${ST}" @@ -518,27 +522,27 @@ # create output string output=`echo ":$opt_F" |\ sed -e "s/^://" \ - -e "s;%\[ac\];${AC_V};g" \ + -e "s;%\\[ac\\];${AC_V};g" \ -e "s;%{ac};${AC_N};g" \ -e "s;%ac;${AC_N};g" \ -e "s;%;${AC_C};g" \ - -e "s;%\[ap\];${AP_V};g" \ + -e "s;%\\[ap\\];${AP_V};g" \ -e "s;%{ap};${AP_N};g" \ -e "s;%ap;${AP_N};g" \ -e "s;%;${AP_C};g" \ - -e "s;%\[at\];${AT_V};g" \ + -e "s;%\\[at\\];${AT_V};g" \ -e "s;%{at};${AT_N};g" \ -e "s;%at;${AT_N};g" \ -e "s;%;${AT_C};g" \ - -e "s;%\[sc\];${SC_V};g" \ + -e "s;%\\[sc\\];${SC_V};g" \ -e "s;%{sc};${SC_N};g" \ -e "s;%sc;${SC_N};g" \ -e "s;%;${SC_C};g" \ - -e "s;%\[sp\];${SP_V};g" \ + -e "s;%\\[sp\\];${SP_V};g" \ -e "s;%{sp};${SP_N};g" \ -e "s;%sp;${SP_N};g" \ -e "s;%;${SP_C};g" \ - -e "s;%\[st\];${ST_V};g" \ + -e "s;%\\[st\\];${ST_V};g" \ -e "s;%{st};${ST_N};g" \ -e "s;%st;${ST_N};g" \ -e "s;%;${ST_C};g" \