diff --git a/CMakeLists.txt b/CMakeLists.txt index 3395bc8..0edf4b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/tools/bind-monitor.sh b/tools/bind-monitor.sh new file mode 100755 index 0000000..42f0cba --- /dev/null +++ b/tools/bind-monitor.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "$1/tools/monitor.sh \"$2/run --run-with-camera\" &" > $2/monitor-run +chmod +x $2/monitor-run diff --git a/tools/monitor.sh b/tools/monitor.sh index 5b16d2a..02381f8 100755 --- a/tools/monitor.sh +++ b/tools/monitor.sh @@ -1,7 +1,7 @@ #!/bin/sh # usage: monitor.sh "" -# 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