forked from sschmid/Entitas
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdateProjects.sh
More file actions
executable file
·36 lines (30 loc) · 870 Bytes
/
updateProjects.sh
File metadata and controls
executable file
·36 lines (30 loc) · 870 Bytes
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
#!/bin/sh
./buildPackage.sh
if [ $? = 0 ]
then
echo "Update projects"
BIN_DIR="bin"
ES="Entitas"
CG=$ES".CodeGenerator"
ESU=$ES".Unity"
UCG=$ESU".CodeGenerator"
UVD=$ESU".VisualDebugging"
ESU_LIBS_DIR=$ESU"/Assets/Libraries"
UCODEGEN_LIBS_DIR=$UCG"/Assets/Libraries"
UVD_LIBS_DIR=$UVD"/Assets/Libraries"
TESTS_LIBS_DIR="Tests/Libraries"
echo " Clean target folders"
find "./"$ESU_LIBS_DIR -type f -name "*.cs" -delete
find "./"$UCODEGEN_LIBS_DIR -type f -name "*.cs" -delete
find "./"$UVD_LIBS_DIR -type f -name "*.cs" -delete
rm -rf $TESTS_LIBS_DIR"/"{$ESU,$UCG,$UVD}
echo " Copy sources"
cp -r $BIN_DIR"/"$ES $ESU_LIBS_DIR
cp -r $BIN_DIR"/"{$ES,$CG,$ESU} $UCODEGEN_LIBS_DIR
cp -r $BIN_DIR"/"{$ES,$CG,$ESU,$UCG} $UVD_LIBS_DIR
cp -r $BIN_DIR"/"{$ESU,$UCG,$UVD} $TESTS_LIBS_DIR
echo "Done."
else
echo "ERROR: Tests didn't pass!"
exit 1
fi