OSSP CVS Repository

ossp - Check-in [1895]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1895
Date: 2002-Feb-23 10:18:03 (local)
2002-Feb-23 09:18:03 (UTC)
User:rse
Branch:
Comment: Port to POSIX 1003.1-2001 (SUSv3) standard: sh.echo, sh.version: "head -1" -> "sed -e 'q'" sh.path: "sort -u | tail -1" -> "sort -r -u | sed -e q" sh.subst: diff -u1 -> diff -U1

Submitted by: Paul Eggert <eggert@twinsun.com>

Tickets:
Inspections:
Files:
ossp-pkg/shtool/ChangeLog      1.167 -> 1.168     7 inserted, 1 deleted
ossp-pkg/shtool/sh.echo      1.29 -> 1.30     2 inserted, 2 deleted
ossp-pkg/shtool/sh.path      1.21 -> 1.22     1 inserted, 1 deleted
ossp-pkg/shtool/sh.subst      1.4 -> 1.5     1 inserted, 1 deleted
ossp-pkg/shtool/sh.version      1.31 -> 1.32     2 inserted, 2 deleted

ossp-pkg/shtool/ChangeLog 1.167 -> 1.168

--- ChangeLog    2002/02/02 18:47:29     1.167
+++ ChangeLog    2002/02/23 09:18:03     1.168
@@ -9,7 +9,13 @@
 
  ChangeLog
 
- Changes between 1.6.0 and 1.6.1 (01-Feb-2002 to xx-Feb-2002):
+ Changes between 1.6.0 and 1.6.1 (01-Feb-2002 to 23-Feb-2002):
+
+   *) Port to POSIX 1003.1-2001 (SUSv3) standard:
+      sh.echo, sh.version: "head -1" -> "sed -e 'q'"
+      sh.path: "sort -u | tail -1" -> "sort -r -u | sed -e q"
+      sh.subst: diff -u1 -> diff -U1
+      [Paul Eggert <eggert@twinsun.com>]
 
    *) Fixed various typos in shtool.pod.
       [Ralf S. Engelschall, Liones <liones@myrealbox.com>]


ossp-pkg/shtool/sh.echo 1.29 -> 1.30

--- sh.echo      2001/12/31 15:06:04     1.29
+++ sh.echo      2002/02/23 09:18:03     1.30
@@ -194,13 +194,13 @@
 if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
     if [ ".$domainname" = . ]; then
         if [ -f /etc/resolv.conf ]; then
-            domainname="`egrep '^[      ]*domain' /etc/resolv.conf | head -1 |\
+            domainname="`egrep '^[      ]*domain' /etc/resolv.conf | sed -e 'q' |\
                          sed -e 's/.*domain//' \
                              -e 's/^[   ]*//' -e 's/^ *//' -e 's/^      *//' \
                              -e 's/^\.//' -e 's/^/./' |\
                          awk '{ printf("%s", $1); }'`"
             if [ ".$domainname" = . ]; then
-                domainname="`egrep '^[  ]*search' /etc/resolv.conf | head -1 |\
+                domainname="`egrep '^[  ]*search' /etc/resolv.conf | sed -e 'q' |\
                              sed -e 's/.*search//' \
                                  -e 's/^[       ]*//' -e 's/^ *//' -e 's/^      *//' \
                                  -e 's/ .*//' -e 's/    .*//' \


ossp-pkg/shtool/sh.path 1.21 -> 1.22

--- sh.path      2001/12/31 15:06:04     1.21
+++ sh.path      2002/02/23 09:18:03     1.22
@@ -100,7 +100,7 @@
         pc=`expr $pc - 1`
     done
     if [ $found = 1 ]; then
-        perl="`cat $tmpfile | sort -u | tail -1 | cut -d: -f4`"
+        perl="`cat $tmpfile | sort -r -u | sed -e 'q' | cut -d: -f4`"
         rm -f $tmpfile >/dev/null 2>&1
         echo "$perl"
         exit 0


ossp-pkg/shtool/sh.subst 1.4 -> 1.5

--- sh.subst     2002/01/02 17:04:56     1.4
+++ sh.subst     2002/02/23 09:18:03     1.5
@@ -92,7 +92,7 @@
                 rm -f $file.new
                 skip=yes
             else
-                (diff -u1 $file $file.new >$tmpfile) 2>/dev/null
+                (diff -U1 $file $file.new >$tmpfile) 2>/dev/null
                 if [ ".`cat $tmpfile`" = . ]; then
                     (diff -C1 $file $file.new >$tmpfile) 2>/dev/null
                     if [ ".`cat $tmpfile`" = . ]; then


ossp-pkg/shtool/sh.version 1.31 -> 1.32

--- sh.version   2001/12/31 15:06:04     1.31
+++ sh.version   2002/02/23 09:18:03     1.32
@@ -55,8 +55,8 @@
 elif [ -r $file ]; then
     #   determine triple from given file
     eval `grep 'Version [0-9]*.[0-9]*[sabp.][0-9]* ([0-9]*-[a-zA-Z]*-[0-9]*)' $file |\
-          head -1 | sed -e 's%.*Version \([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\) (\([0-9]*-[a-zA-Z]*-[0-9]*\)).*%\
-          ver="\1";rev="\2";typ="\3";lev="\4";tim="\5"%'`
+          sed -e 's%.*Version \([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\) (\([0-9]*-[a-zA-Z]*-[0-9]*\)).*%\
+          ver="\1";rev="\2";typ="\3";lev="\4";tim="\5"%' -e 'q'`
 else
     #   intialise to first version
     ver=0

CVSTrac 2.0.1