📅  最后修改于: 2022-03-11 14:44:53.464000             🧑  作者: Mango
--> My custom command that live sin my /usr/bin folder , that runs my cv2 cpp files just fine without any problems
--> that may help someone
#!/bin/bash
file=$@
if [ "${file: -4}" = ".cpp" ]; then
g++ $file -I/opt/robots/pepper/ctc-linux64-atom-2.5.10.7/opencv2/include/ -L/opt/robots/pepper/ctc-linux64-atom-2.5.10.7/opencv2/lib -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_videoio
if $status ; then
./a.out && rm -rf a.out
fi
else
echo "This Command should be used only with cpp files that uses the opencv library !!"
fi