aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-10-19 03:26:45 +0000
committerrsc <devnull@localhost>2005-10-19 03:26:45 +0000
commit5dde0bbad8143efdf19c985783dd680bd8cf76c9 (patch)
tree422f6088d05de5bcda4dca274223cd158e7bff56 /bin
parentf3832660d444da350042b6985c9c942656691b2f (diff)
downloadplan9port-5dde0bbad8143efdf19c985783dd680bd8cf76c9.tar.gz
plan9port-5dde0bbad8143efdf19c985783dd680bd8cf76c9.tar.bz2
plan9port-5dde0bbad8143efdf19c985783dd680bd8cf76c9.zip
Use 9 file always.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/page14
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/page b/bin/page
index e38b6dd6..0c7bc021 100755
--- a/bin/page
+++ b/bin/page
@@ -28,7 +28,7 @@ xfile()
then
echo 'troff intermediate output'
else
- file - < "$1"
+ 9 file < "$1" | sed 's/stdin: //'
fi
}
@@ -49,6 +49,9 @@ main()
*PS*)
psv $1
;;
+ *postscript*)
+ psv $1
+ ;;
*PostScript*)
psv $1
;;
@@ -64,7 +67,8 @@ case $# in
0)
tmp=/var/tmp/page.$$.tmp
cat >$tmp
- case "`xfile $tmp`" in
+ type=`xfile $tmp`
+ case "$type" in
*troff*)
mv $tmp $tmp.tr
tmp=$tmp.tr
@@ -81,6 +85,10 @@ case $# in
mv $tmp $tmp.ps
tmp=$tmp.ps
;;
+ *postscript*)
+ mv $tmp $tmp.ps
+ tmp=$tmp.ps
+ ;;
*GIF*)
mv $tmp $tmp.gif
tmp=$tmp.gif
@@ -98,7 +106,7 @@ case $# in
tmp=$tmp.png
;;
*)
- echo 1>&2 page: unrecognized file type on standard input
+ echo 1>&2 page: unrecognized file type on standard input: $type
rm -f $tmp
exit 1
esac