I have written a bash script to automate cross-compiling an OpenCV program:
echo "Compiling started for: $1"
if [[ $1 == *.c ]]
then
gcc -ggdb `pkg-config --cflags opencv` -o `basename $1 .c` $1 `pkg-config --libs opencv`;
elif [[ $1 == *.cpp ]]
then
g++ -ggdb `pkg-config --cflags opencv` -o `basename $1 .cpp` $1 `pkg-config --libs opencv`;
else
echo "Only c or c++ files"
fi
echo "Output: ${1%.*}"
But now I noticed that there does not exist a bashrc at the Angstrom distribution. So what can I do?
Regards
#!/bin/bashat the top of the script (a shebang line), otherwise your script might be executed in a different shell. – Gilles Nov 3 '12 at 23:37