run.sh 537 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. run_mode=""
  3. if(($#==1))
  4. then
  5. run_mode=$1
  6. else
  7. exit -1
  8. fi
  9. if [[ "$run_mode" != "run" ]]
  10. then
  11. exit -1
  12. fi
  13. dd=$(date +%Y%m%d)
  14. # 0. abs path
  15. abs_path=$(cd `dirname $0`; pwd)
  16. log_file="${abs_path}/logs/${dd}.log"
  17. # 1. make data
  18. make_sh="${abs_path}/make_data.sh"
  19. echo `date` "sh +x $make_sh >> $log_file"
  20. sh +x $make_sh >> $log_file 2>&1 &
  21. wait
  22. sleep 30s
  23. # 2. rov batch
  24. rov_batch_sh="${abs_path}/rov/sample/scripts/rov_batch.sh"
  25. echo `date` "sh +x $rov_batch_sh run"
  26. sh +x $rov_batch_sh run >> $log_file 2>&1 &
  27. wait