create_doxyen 1011 Bytes
#!/bin/bash
# requrires to install xdotool
#
echo "Running doxygen and opening firefox browser, requires xdotool"
echo
# determine path of this script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DOXYFILELOCATION=$DIR/publish/doxygen
DOXYDESTINATION=$DIR/../documentation/doxygen
echo "Doxygen source: $DOXYFILELOCATION"
echo "Doxygen target: $DOXYDESTINATION"
echo
echo "Calling doxygen. Error messages are written to $DOXYDESTINATION/doxygen.log"
echo
cd $DOXYFILELOCATION
echo "Doxygen messages: " > $DOXYDESTINATION/doxygen.log
echo "-----------------"  > $DOXYDESTINATION/doxygen.log
doxygen doxyfile 2>> $DOXYDESTINATION/doxygen.log > /dev/null
kwrite $DOXYDESTINATION/doxygen.log &
SERVICE='firefox'
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
	# refresh open windows
    xdotool windowactivate `xdotool search --name "Mozilla Firefox" | head -1`
    xdotool key F5
else
	# open window
	firefox $DOXYDESTINATION/html/index.html  > /dev/null &> /dev/null &
fi
echo
echo "Finished"