Last active
December 28, 2015 13:48
-
-
Save mitakeck/d3afb1423e11ea5050ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# OpenCV runnning without GUI | |
echo "make dir" | |
mkdir /tmp/`echo $2` | |
echo "compiling $1" | |
if [[ $1 == *.cpp ]] | |
then | |
g++ -ggdb `pkg-config --cflags opencv` -o `basename $1 .cpp` $1 `pkg-config --libs opencv`; | |
else | |
echo "Please compile only *.cpp file" | |
fi | |
echo "Output file => ${1%.*}" | |
echo "Run..." | |
echo $USER | |
echo "${1%.*} $2" | |
xvfb-run --server-args="-screen 0, 1024x768x24" ./`echo ${1%.*} $2` | |
echo "convert to animation gif" | |
gm convert /tmp/`echo $2`/*.bmp /tmp/`echo $2`/animation.gif | |
echo "remove tmp images" | |
# rm -r /tmp/`echo $2` | |
echo "End" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment