Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > c8c18b36840d2165c44ac1566dcd5553 > files > 145

python-urwid-1.1.1-5.mga4.x86_64.rpm

#!/bin/bash -e

# args: scripts to capture

DISPLAYNUM=1
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
	if [ -f "${script}.xdotool" ]; then
		"$SCREENSHOTS" "$script" < "${script}.xdotool"
	fi
done