fieker-DuValspielwiese
Last change
on this file since 12aa9a was
75f460,
checked in by Hans Schoenemann <hannes@…>, 9 years ago
|
format
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | VERSION=`flex --version |sed -e "s/^.*version //"|sed -e "s/^flex //"` |
---|
3 | LV=`echo $VERSION|sed -e "s/\.[0-9]*\.[0-9]*\$//"` |
---|
4 | MIDV=`echo $VERSION|sed -e "s/^[0-9]*\.//"|sed -e "s/\.[0-9]*\$//"` |
---|
5 | TV=`echo $VERSION|sed -e "s/^[0-9]*\.[0-9]*\\.//"` |
---|
6 | #echo $LV $MIDV $TV |
---|
7 | #goodversion="" |
---|
8 | if [ $LV -lt 2 ]; |
---|
9 | then goodversion=true |
---|
10 | fi |
---|
11 | if [ $LV -eq 2 ]; |
---|
12 | then |
---|
13 | if [ $MIDV -lt 5 ]; |
---|
14 | then goodversion=true |
---|
15 | fi |
---|
16 | if [ $MIDV -eq 5 ]; |
---|
17 | then |
---|
18 | if [ $TV -le 4 ]; |
---|
19 | then goodversion=true; |
---|
20 | fi |
---|
21 | fi |
---|
22 | fi |
---|
23 | |
---|
24 | #echo $goodversion |
---|
25 | if [ -z $goodversion ]; |
---|
26 | then |
---|
27 | #echo "bad version, trying to use touch" |
---|
28 | for arg in $1 $2 $3 $4 $5 $6 $7 $8 $9 |
---|
29 | do |
---|
30 | #echo loop |
---|
31 | if [ -z $arg ]; |
---|
32 | then |
---|
33 | dummy=0; |
---|
34 | else |
---|
35 | #echo `echo $arg|sed -e "s/-.*/SPECIALVALUE/"` |
---|
36 | if [ SPECIALVALUE = `echo $arg|sed -e "s/-.*/SPECIALVALUE/"` ]; |
---|
37 | |
---|
38 | then |
---|
39 | dummy=0; |
---|
40 | else |
---|
41 | file=$arg |
---|
42 | |
---|
43 | fi |
---|
44 | fi |
---|
45 | done |
---|
46 | #echo file arg is $file |
---|
47 | file2=`echo $file|sed -e "s/\.l$/\.cc/"` |
---|
48 | #echo $file2 |
---|
49 | if [ -r $file2 ]; |
---|
50 | then |
---|
51 | # file3=`echo $file2|sed -e "s/\$/.tmp/"` |
---|
52 | # cp $file2 $file3 |
---|
53 | # cat $file3 |
---|
54 | cat $file2 |
---|
55 | else |
---|
56 | #echo "file does not exist" |
---|
57 | exit 1; |
---|
58 | fi |
---|
59 | |
---|
60 | else |
---|
61 | #echo "good version"; |
---|
62 | flex $1 $2 $3 $4 $5 $6 $7 $8 $9 |
---|
63 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.