tno more case problems - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit f65cd0d511c2b7301408ffffaa42ff080b1b54fd
parent 7fe619f76637dcbae2591830d8175b769f96b6eb
Author: rsc 
Date:   Thu, 29 Dec 2005 22:37:34 +0000

no more case problems

Diffstat:
  M bin/page                            |      43 ++++++++++++++-----------------

1 file changed, 20 insertions(+), 23 deletions(-)
---
diff --git a/bin/page b/bin/page
t@@ -28,7 +28,7 @@ xfile()
         then
                 echo 'troff intermediate output'
         else
-                9 file < "$1" | sed 's/stdin: //'
+                9 file < "$1" | sed 's/stdin: //' | tr A-Z a-z
         fi
 }
 
t@@ -43,18 +43,15 @@ main()
                 *troff*)
                         tr2post "$1" | psfonts | page
                         ;;
-                *PDF*)
+                *pdf*)
                         psv $1
                         ;;
-                *PS*)
+                *ps*)
                         psv $1
                         ;;
                 *postscript*)
                         psv $1
                         ;;
-                *PostScript*)
-                        psv $1
-                        ;;
                 *)
                         qiv "$@"
                         ;;
t@@ -73,38 +70,38 @@ case $# in
                 mv $tmp $tmp.tr
                 tmp=$tmp.tr
                 ;;
-        *PDF*)
+        *pdf*)
                 mv $tmp $tmp.pdf
                 tmp=$tmp.pdf
                 ;;
-        *PS*)
-                mv $tmp $tmp.ps
-                tmp=$tmp.ps
-                ;;
-        *PostScript*)
-                mv $tmp $tmp.ps
-                tmp=$tmp.ps
-                ;;
-        *postscript*)
-                mv $tmp $tmp.ps
-                tmp=$tmp.ps
-                ;;
-        *GIF*)
+        *gif*)
                 mv $tmp $tmp.gif
                 tmp=$tmp.gif
                 ;;
-        *JPG*)
+        *jpg*)
                 mv $tmp $tmp.jpg
                 tmp=$tmp.jpg
                 ;;
-        *JPEG*)
+        *jpeg*)
                 mv $tmp $tmp.jpg
                 tmp=$tmp.jpg
                 ;;
-        *PNG*)
+        *png*)
                 mv $tmp $tmp.png
                 tmp=$tmp.png
                 ;;
+        *postscript*)
+                mv $tmp $tmp.ps
+                tmp=$tmp.ps
+                ;;
+        *postscript*)
+                mv $tmp $tmp.ps
+                tmp=$tmp.ps
+                ;;
+        *ps*)
+                mv $tmp $tmp.ps
+                tmp=$tmp.ps
+                ;;
         *)
                 echo 1>&2 page: unrecognized file type on standard input: $type
                 rm -f $tmp