This commit is contained in:
JiatongSun
2019-05-07 17:26:06 +08:00
3 changed files with 6 additions and 3 deletions

View File

@@ -30,5 +30,4 @@ TARGET_LINK_LIBRARIES(run ${PROJECT_SOURCE_DIR}/others/libMVSDK.so)
ADD_CUSTOM_TARGET(train COMMAND "gnome-terminal" "-x" "bash" "-c" "\"${PROJECT_SOURCE_DIR}/tools/TrainCNN/backward.py\"" )
# Todo
# ADD_CUSTOM_TARGET(bind-monitor COMMAND "")
ADD_CUSTOM_TARGET(bind-monitor COMMAND "${PROJECT_SOURCE_DIR}/tools/bind-monitor.sh" "${PROJECT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}")

4
tools/bind-monitor.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
echo "$1/tools/monitor.sh \"$2/run --run-with-camera\" &" > $2/monitor-run
chmod +x $2/monitor-run

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# usage: monitor.sh "<the exe file's absolute path and its shell parameter>"
# And then when ever the exe shutdonw it will be automatically restart
# And then when ever the exe shutdown it will be automatically restart
exe=$1
while true; do