forked from franckverrot/fruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fruby.sh
executable file
·62 lines (59 loc) · 904 Bytes
/
fruby.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
git checkout -- mrblib mrbgems src
make clean
for kw in\
__ENCODING__,__ENCODING__\
__FILE__,__FILE__\
__LINE__,__LINE__\
BEGIN,BEGIN\
END,END\
alias,renomme\
and,et\
begin,debut\
break,termine\
case,selon\
class,classe\
def,défini\
do,faire\
else,sinon\
elsif,sinonsi\
end,fin\
ensure,assure\
false,faux\
for,pour\
if,si\
in,dans\
module,module\
next,suivant\
nil,rien\
not,non\
or,ou\
redo,refaire\
rescue,sauve\
retry,recommence\
return,retourne\
self,mon\
super,maman\
then,alors\
true,vrai\
undef,indéfini\
unless,saufsi\
until,jusqua\
when,quand\
while,tantque\
yield,donne
do
OLDIFS=$IFS;
IFS=","
set $kw
old=$1
new=$2
IFS=$OLDIFS
sed -i "s/\<$old\>/$new/g" src/keywords
for file in `find mrb* -type f -iname "*.rb"`
do
echo "Altering $file with $old $new"
sed -i "s/\<$old\>/$new/g" $file
done
done
make
mv bin/mruby fruby