summaryrefslogtreecommitdiff
path: root/docs/tools/compile_pngs.sh
blob: f9135e962d6ba408771fc241aebd51cbc37248a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash -e

# args: scripts to capture

DISPLAYNUM=5
SCREENSHOTS=`dirname $0`/screenshots.sh

XVFB=$(which Xvfb)
if [ -n $XVFB ]; then
	Xvfb :$DISPLAYNUM -screen 0 1024x768x24 &
	XVFBPID=$!
	DISPLAY=:$DISPLAYNUM # this still doesn't work
	trap "kill $XVFBPID" EXIT
fi

for script in $@; do
	echo "doing $script"
	if [ -f "${script}.xdotool" ]; then
		"$SCREENSHOTS" "$script" < "${script}.xdotool"
	fi
done