This repository has been archived by the owner on Dec 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clip52.sh
69 lines (60 loc) · 1.56 KB
/
clip52.sh
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
66
67
68
#!/bin/bash
echo " Copyright bring.out"
echo "------------------------------------------------------"
echo "clipper cl-sc build sistem, ver 01.10, 03.2002-06.2008"
echo " autor: [email protected]"
echo ""
echo ""
ToLower()
{
#echo ToLower
lowercase *.OBJ
#read cDN
}
prgname=$1
shift
prgname2=$(echo $prgname | tr [/] [\\\\] )
#echo "Prg name: $prgname2"
clipper $prgname2 $@ > /tmp/clipcomp
#read cDn
echo -----------------------
ERROR=`cat /tmp/clipcomp | grep -c -e "No code generated" -e "include error" -e "Statement not recognized" -e "Syntax error" -e "syntax error" -e "t open" -e "Error"`
#cat /tmp/clipcomp
#echo "--------------------- origggggggggggggggggggggg ----------------"
#read cDN
echo --------------------------------------------------------------------
#echo moram "c:\dir\test.prg" pretvoriti u "/dir/test.prg"
sed -e "s/\(.*\)(\(.*\))[ ]\(.*\)/\1:\2:\3/; s/h://g; s/H://g; s/\\\\/\//g; y/ABCDEFGHIJKLMNOPQRSTUVZXYW/abcdefghijklmnopqrstuvzxyw/" /tmp/clipcomp
echo --------------------------------------------------------------------
if [ "$ERROR" == "" ]
then
ERROR=0
fi
if [ "$ERRORH1" == "" ]
then
ERRORH1=0
fi
if [ "$ERRORH2" == "" ]
then
ERRORH2=0
fi
if [ "$ERRORH3" == "" ]
then
ERRORH3=0
fi
if [ "$ERRORH4" == "" ]
then
ERRORH4=0
fi
if [ "$ERRORH5" == "" ]
then
ERRORH5=0
fi
if [ $ERROR -gt 0 ] || [ $ERRORH1 -gt 0 ] || [ $ERRORH2 -gt 0 ] || [ $ERRORH3 -gt 0 ] || [ $ERRORH4 -gt 0 ] || [ $ERRORH5 -gt 0 ]
then
echo "!!!!!!!!!!!!greska!!!!!!!!!!!!!!!!!!!!!!"
exit 1
else
ToLower
exit 0
fi