-
Notifications
You must be signed in to change notification settings - Fork 2
/
tosqueak.sh
executable file
·40 lines (36 loc) · 1.24 KB
/
tosqueak.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
#!/usr/bin/env bash
FILES=$(grep filein package.xml | sed 's/<[/a-z]*>//g')
OUTPUT=shampoo-squeak-$(git rev-parse --short HEAD).st
TRANSCRIPT=ShampooTranscript
XMLNODE=ShNode
XMLTEXT=ShText
gst-convert -v \
-f gst \
-F squeak \
-C -$TRANSCRIPT -C -$XMLNODE -C -$XMLTEXT \
-o $OUTPUT \
$FILES
if [ "$?" -ne "0" ]; then
echo "Fatal error, exiting"
exit 1
fi
sed -i \
-e 's/ShampooXML\.ShNode/ShampooXMLNode/g' \
-e 's/ShampooXML\.ShText/ShampooXMLText/g' \
-e 's/ShNode/ShampooXMLNode/g' \
-e 's/ShText/ShampooXMLText/g' \
-e 's/Shampoo.ShampooTranscript install\!//g' \
-e "s/methodsFor: nil/methodsFor: 'as yet unclassified'/g" \
-e 's/LoginTest/ShampooLoginTest/g' \
-e 's/NamespacesTest/ShampooNamespacesTest/g' \
-e 's/ClassesTest/ShampooClassesTest/g' \
-e 's/ClassTest/ShampooClassTest/g' \
-e 's/CatsTest/ShampooCatsTest/g' \
-e 's/MethodsTest/ShampooMethodsTest/g' \
-e 's/MethodTest/ShampooMethodTest/g' \
-e 's/CompileClassTest/ShampooCompileClassTest/g' \
-e 's/CompileClassSideTest/ShampooCompileClassSideTest/g' \
-e 's/CompileMethodTest/ShampooCompileMethodTest/g' \
-e 's/DoItTest/ShampooDoItTest/g' \
-e 's/PrintItTest/ShampooPrintItTest/g' \
$OUTPUT