summaryrefslogtreecommitdiffstats
path: root/fbbrowser/testApp.sh
blob: 09956959f51c4e80b109f7016673cfc7a632832c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# This script now needs to have the URL to load as an argument.
if [ $# = 0 ]; then
  echo "No URL passed, exiting..."
  exit
fi
# Start QT's virtual framebuffer
/usr/local/Trolltech/Qt-4.7.1/bin/qvfb -width 800 -height 600 &
# Wait for it to load (needed?)
sleep 1
# Start the fbbrowser app.
# This requires the fbgui git repository to be in the user's home directory.
export PATH=~/fbgui/fbbrowser/:$PATH
fbgui -qws $1
# Check if fbbrowser is not running, if so kill the qvfb.
if [ $(ps aux | grep -v grep | grep -c fbgui) -eq 1 ]
then
	echo "fbgui is still running ..."
else
	echo "fbgui stopped running, killing qvfb ..."
	killall qvfb
fi