|
89 | 89 | fi
|
90 | 90 | fi
|
91 | 91 |
|
| 92 | + |
| 93 | + |
| 94 | +if [ "$BUILD_CLEAN" == "n" ]; then |
| 95 | + NOUPDATE="y" |
| 96 | +fi |
| 97 | + |
| 98 | +#check args (and override config as desired) |
| 99 | +while [[ $# -gt 0 ]] |
| 100 | +do |
| 101 | + case $1 in |
| 102 | + -r) |
| 103 | + SVN_REV_ARG="-r $2" |
| 104 | + NOUPDATE= |
| 105 | + shift |
| 106 | + ;; |
| 107 | + -j) |
| 108 | + THREADS="-j $2" |
| 109 | + shift |
| 110 | + ;; |
| 111 | + -help|--help) |
| 112 | + echo " -r VER Specifies the SVN revision to update to" |
| 113 | + echo " -j THREADS Specifies how many jobs to make with" |
| 114 | + echo " --help This text" |
| 115 | + exit 0 |
| 116 | + ;; |
| 117 | + -build|--build) |
| 118 | + TARGET="FTE_CONFIG=$2" |
| 119 | + shift |
| 120 | + ;; |
| 121 | + --noupdate) |
| 122 | + NOUPDATE="y" |
| 123 | + ;; |
| 124 | + *) |
| 125 | + echo "Unknown option $1" |
| 126 | + ;; |
| 127 | + esac |
| 128 | + shift |
| 129 | +done |
| 130 | + |
| 131 | + |
92 | 132 | if [ "$REUSE_CONFIG" != "y" ]; then
|
93 | 133 | #linux compiles are native-only, so don't bug out on cygwin which lacks a cross compiler.
|
94 | 134 | BUILD_LINUXx86=n
|
@@ -139,6 +179,7 @@ if [ "$REUSE_CONFIG" != "y" ]; then
|
139 | 179 | read -n 1 -p "Build for NaCL? [y/N] " BUILD_NACL && echo
|
140 | 180 | fi
|
141 | 181 |
|
| 182 | +BUILD_CLEAN=${BUILD_CLEAN:-y} |
142 | 183 | BUILD_LINUXx86=${BUILD_LINUXx86:-y}
|
143 | 184 | BUILD_LINUXx64=${BUILD_LINUXx64:-y}
|
144 | 185 | BUILD_LINUXx32=${BUILD_LINUXx32:-n}
|
@@ -169,6 +210,8 @@ if [ "$UID" != "0" ]; then
|
169 | 210 | echo "NACL_SDK_ROOT=\"$NACLROOT/nacl_sdk/$NACLSDKVERSION\"" >>$FTECONFIG
|
170 | 211 | echo "NACLSDKVERSION=\"$NACLSDKVERSION\"" >>$FTECONFIG
|
171 | 212 |
|
| 213 | + echo "BUILD_CLEAN=\"$BUILD_CLEAN\"" >>$FTECONFIG |
| 214 | + |
172 | 215 | echo "BUILD_LINUXx86=\"$BUILD_LINUXx86\"" >>$FTECONFIG
|
173 | 216 | echo "BUILD_LINUXx64=\"$BUILD_LINUXx64\"" >>$FTECONFIG
|
174 | 217 | echo "BUILD_LINUXx32=\"$BUILD_LINUXx32\"" >>$FTECONFIG
|
@@ -381,13 +424,15 @@ if [ "$BUILD_NACL" == "y" ] && [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ];
|
381 | 424 | fi
|
382 | 425 |
|
383 | 426 |
|
384 |
| -#initial checkout of fte's svn |
385 | 427 | if [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ]; then
|
386 |
| - if [ ! -d $SVNROOT ]; then |
387 |
| - svn checkout https://svn.code.sf.net/p/fteqw/code/trunk $SVNROOT |
388 |
| - else |
389 |
| - cd $SVNROOT |
390 |
| - svn up |
| 428 | + #initial checkout of fte's svn |
| 429 | + if [ "$NOUPDATE"!="n" ]; then |
| 430 | + if [ ! -d $SVNROOT ]; then |
| 431 | + svn checkout https://svn.code.sf.net/p/fteqw/code/trunk $SVNROOT $SVN_REV_ARG |
| 432 | + else |
| 433 | + cd $SVNROOT |
| 434 | + svn up $SVN_REV_ARG |
| 435 | + fi |
391 | 436 | fi
|
392 | 437 |
|
393 | 438 | #FIXME: there may be race conditions when compiling.
|
|
449 | 494 |
|
450 | 495 | echo "Setup script complete."
|
451 | 496 | echo "When you run build_wip.sh output will be written to $BUILDFOLDER/*"
|
| 497 | + |
0 commit comments