@@ -19,41 +19,48 @@ find_profile_arg() {
1919 done
2020}
2121
22+ ice_execute () {
23+
24+ # Activate the RUN enviroment
25+ . ./build/tools/conanrun.sh
26+
27+ # Update fastbuild executables so we can run them actually
28+ # I have currently no idea, how I can set them executable from conan
29+ chmod +x $FBUILD_EXE
30+
31+ # Run any moonscript 'script'
32+ lua $MOON_SCRIPT workspace.moon $*
33+ ret_code=$?
34+
35+ # Deactivate the RUN enviroment
36+ . ./build/tools/deactivate_conanrun.sh
37+
38+ if [ $ret_code != 0 ]; then
39+ exit $ret_code
40+ fi
41+
42+ exit 0
43+ }
44+
2245ice_initialize () {
2346 find_profile_arg $*
2447
2548 cd build/tools
26- conan install ../../tools --build=missing --profile $conan_profile
49+ conan install ../../tools -of . - -build=missing --profile $conan_profile
2750 cd ../..
2851
29- exit 0
52+ # Continue execution normally
53+ ice_execute $*
3054}
3155
3256# Ensure the build dir exists
3357[ ! -d " build" ] && mkdir -p " build"
3458
3559[ ! -d " build/tools" ] && mkdir -p " build/tools"
3660
37- [ ! -f " build/tools/activate .sh" ] && ice_initialize $*
61+ [ ! -f " build/tools/conanrun .sh" ] && ice_initialize $*
3862
3963[ " $1 " = " init" ] && ice_initialize $*
4064
41- # Activate the enviroment
42- . ./build/tools/activate.sh
43-
44- # Update fastbuild executables so we can run them actually
45- # I have currently no idea, how I can set them executable from conan
46- chmod +x $FBUILD_EXE
47-
48- # Run any moonscript 'script'
49- lua $MOON_SCRIPT workspace.moon $*
50- ret_code=$?
51-
52- # Deactivate the enviroment
53- . ./build/tools/deactivate.sh
54-
55- if [ $ret_code != 0 ]; then
56- exit $ret_code
57- fi
58-
59- exit 0
65+ # Execute any of the commands given
66+ ice_execute $*
0 commit comments