File: glide3x-build-multiargs

package info (click to toggle)
glide 2002.04.10ds1-15
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 59,556 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (62 lines) | stat: -rw-r--r-- 1,786 bytes parent folder | download | duplicates (6)
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
Status: applied

Index: b/glide3x/build.3dfx.in
===================================================================
--- a/glide3x/build.3dfx.in
+++ b/glide3x/build.3dfx.in
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 function timereport() {
-	STARTTIME=$1
-	ENDTIME=$2
+    STARTTIME=$1
+    ENDTIME=$2
     SECONDSPERMIN=60
     SECONDSPERHOUR=`expr 60 \* 60`
     SECONDSPERDAY=`expr 60 \* 60 \* 24`
@@ -16,31 +16,31 @@ function timereport() {
     ELAPSEDTIME=`expr $ELAPSEDTIME % $SECONDSPERHOUR`
     MINUTES=`expr $ELAPSEDTIME / $SECONDSPERMIN`
     ELAPSEDTIME=`expr $ELAPSEDTIME % $SECONDSPERMIN`
-	echo "Time Elapsed: $YEARS Years, $DAYS Days, $HOURS Hours, $MINUTES Minutes, $ELAPSEDTIME Seconds"
+    echo "Time Elapsed: $YEARS Years, $DAYS Days, $HOURS Hours, $MINUTES Minutes, $ELAPSEDTIME Seconds"
 }
 
 function diskreport() {
-	SIGN=""
-	DISKUSAGE=`expr $2 - $1`
-	if [ $DISKUSAGE -lt 0 ]
-	then
-	    DISKUSAGE=`expr $DISKUSAGE '*' -1`
+    SIGN=""
+    DISKUSAGE=`expr $2 - $1`
+    if [ $DISKUSAGE -lt 0 ]
+    then
+        DISKUSAGE=`expr $DISKUSAGE '*' -1`
         SIGN='-'
     fi
-	DISKUSAGE_INT=`expr $DISKUSAGE / 1024`
-	DISKUSAGE_FRAC=`expr $DISKUSAGE % 1024`
+    DISKUSAGE_INT=`expr $DISKUSAGE / 1024`
+    DISKUSAGE_FRAC=`expr $DISKUSAGE % 1024`
     echo "Disk usage: $SIGN$DISKUSAGE_INT.$DISKUSAGE_FRAC Mb"
 }
 
 function instrument_command() {
     STARTDISK=`df -k . | grep --invert-match '^Filesystem' | awk '{print $3;}'`
-	df -k .
-	STARTTIME=`date +%s`
-    (exec $*)
+    df -k .
+    STARTTIME=`date +%s`
+    (exec "$@")
     ENDTIME=`date +%s`
     ENDDISK=`df -k . | grep --invert-match '^Filesystem' | awk '{print $3;}'`
-	df -k .
-	timereport $STARTTIME $ENDTIME
+    df -k .
+    timereport $STARTTIME $ENDTIME
     diskreport $STARTDISK $ENDDISK
 }