winlin

fix demo bug, remove the api server static-dir when link to nginx

@@ -356,16 +356,17 @@ else @@ -356,16 +356,17 @@ else
356 fi 356 fi
357 357
358 echo "link players to cherrypy static-dir" 358 echo "link players to cherrypy static-dir"
359 -rm -f research/api-server/static-dir/players && 359 +rm -rf research/api-server/static-dir/players &&
360 ln -sf `pwd`/research/players research/api-server/static-dir/players && 360 ln -sf `pwd`/research/players research/api-server/static-dir/players &&
361 rm -f research/api-server/static-dir/crossdomain.xml && 361 rm -f research/api-server/static-dir/crossdomain.xml &&
362 ln -sf `pwd`/research/players/crossdomain.xml research/api-server/static-dir/crossdomain.xml && 362 ln -sf `pwd`/research/players/crossdomain.xml research/api-server/static-dir/crossdomain.xml &&
363 -rm -f research/api-server/static-dir/live && 363 +rm -rf research/api-server/static-dir/live &&
364 mkdir -p `pwd`/${SRS_OBJS}/nginx/html/live && 364 mkdir -p `pwd`/${SRS_OBJS}/nginx/html/live &&
365 ln -sf `pwd`/${SRS_OBJS}/nginx/html/live research/api-server/static-dir/live && 365 ln -sf `pwd`/${SRS_OBJS}/nginx/html/live research/api-server/static-dir/live &&
366 -rm -f research/api-server/static-dir/forward && 366 +rm -rf research/api-server/static-dir/forward &&
367 mkdir -p `pwd`/${SRS_OBJS}/nginx/html/forward && 367 mkdir -p `pwd`/${SRS_OBJS}/nginx/html/forward &&
368 ln -sf `pwd`/${SRS_OBJS}/nginx/html/forward research/api-server/static-dir/forward 368 ln -sf `pwd`/${SRS_OBJS}/nginx/html/forward research/api-server/static-dir/forward
  369 +ret=$?; if [[ $ret -ne 0 ]]; then echo "link players to cherrypy static-dir failed, ret=$ret"; exit $ret; fi
369 370
370 # only when the nginx is ok, 371 # only when the nginx is ok,
371 # if api-server not enalbed, use nginx as demo. 372 # if api-server not enalbed, use nginx as demo.