From: Chris Hanson Date: Wed, 28 Jun 1995 22:05:35 +0000 (+0000) Subject: Convert to Bourne shell format -- linux doesn't have csh. X-Git-Tag: 20090517-FFI~6233 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c0dc0d2195249d2879727bdd7997232d03cf564e;p=mit-scheme.git Convert to Bourne shell format -- linux doesn't have csh. --- diff --git a/v7/src/microcode/s/ultrix.m4 b/v7/src/microcode/s/ultrix.m4 index 510f1896b..04541f849 100755 --- a/v7/src/microcode/s/ultrix.m4 +++ b/v7/src/microcode/s/ultrix.m4 @@ -1,31 +1,35 @@ -#!/bin/csh -f +#!/bin/sh ### -### $Id: ultrix.m4,v 1.6 1993/06/24 07:32:21 gjr Exp $ +### $Id: ultrix.m4,v 1.7 1995/06/28 22:05:35 cph Exp $ ### -### Copyright (c) 1989-1993 Massachusetts Institute of Technology +### Copyright (c) 1989-1995 Massachusetts Institute of Technology ### #### Postprocessing to make m4 work correctly under Ultrix & BSD. -if ($#argv == 0) then +if [ $# = 0 ] +then sed -e '/^#/D' | m4 | sed -e 's/@/$/g' -e 's/^ $//' else - set tmpfil = "m4.tmp" - set seen_input = 0 + tmpfil="m4.tmp" + seen_input=0 rm -f "$tmpfil" - - while ($#argv != 0) - if ("$argv[1]" == "-P") then - echo "$argv[2]" >> "$tmpfil" + + while [ $# != 0 ] + do + if [ "$1" = "-P" ] + then + echo "$2" >> "$tmpfil" shift else - set seen_input = 1 - sed -e '/^#/D' < "$argv[1]" >> "$tmpfil" - endif + seen_input=1 + sed -e '/^#/D' < "$1" >> "$tmpfil" + fi shift - end - if ($seen_input == 0) then + done + if [ $seen_input = 0 ] + then sed -e '/^#/D' >> "$tmpfil" - endif + fi m4 < "$tmpfil" | sed -e 's/@/$/g' -e 's/^ $//' rm -f "$tmpfil" -endif +fi