blob: f56d65651aba7c0d17a67ff1f2cf0e4a146dc756 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
$NetBSD: patch-ad,v 1.1 2000/08/04 08:50:17 jlam Exp $
--- pgms/index.sh.orig Sat May 13 15:31:48 1995
+++ pgms/index.sh Fri Aug 4 02:33:42 2000
@@ -20,12 +20,50 @@
BASE=${BASE-pgms/index.base}
TARGET=${TARGET-results/log}
TEMP=/tmp/$$.dat
+
+HAVEPRINT=false ; export HAVEPRINT
+if expr "`type print`" : '^print is shell builtint$' >/dev/null 2>&1 ; then
+ HAVEPRINT=true
+fi
+HAVEPRINTF=false ; export HAVEPRINTF
+if expr "`type printf`" : '^printf is shell builtint$' >/dev/null 2>&1 ; then
+ HAVEPRINTF=true
+elif expr "`type printf`" : '.* is .*/printf$' >/dev/null 2>&1 ; then
+ HAVEPRINTF=true
+fi
+if $HAVEPRINT ; then
+ # use ``$echo'' if any of the other variables...
+ echo=print
+ nl='\n'
+ n=''
+ c='\c'
+elif $HAVEPRINTF ; then
+ # use ``$echo'' if any of the other variables...
+ echo=printf
+ nl='\n'
+ n=''
+ c='\c'
+else
+ echo=echo
+ (echo "hi there\c" ; echo " ") >echotmp
+ # Configure checks to make sure grep returns a status...
+ if grep c echotmp >/dev/null 2>&1 ; then
+ nl=''
+ n='-n'
+ c=''
+ else
+ nl='\n'
+ n=''
+ c='\c'
+ fi
+ rm -f echotmp
+fi
#
# BASELINE DATA
#
if [ $# -lt 1 ]
then
- echo "Data File for baseline: \c"
+ $echo $n "Data File for baseline: $c"
read BASE
else
BASE=$1
@@ -41,7 +79,7 @@
#
if [ $# -lt 2 ]
then
- echo "Source File for target machine results: \c"
+ $echo $n "Source File for target machine results: $c"
read TARGET
else
TARGET=$2
|