~aaronhoneycutt/ubiquity-slideshow-ubuntu/artful

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

TITLE="Slideshow tester"

SOURCE=.
BUILD=$SOURCE/build
SOURCESLIDES=$SOURCE/slideshows

slideshow=$1
if [ -z "$slideshow" ]
	then
		slideshows=""
		for show in $SOURCESLIDES/*; do
			showname=$(basename $show)
			#oddly placed files we need to ignore
			[ $showname = "link-core" ] && continue
			#if we're still going, add this slideshow to the list
			select=FALSE
			[ $showname = "ubuntu" ] && select=TRUE
			slideshows="$slideshows $select $showname"
		done
		slideshow=$(zenity --list --radiolist --column="Pick" --column="Slideshow" $slideshows --title="$TITLE" --text="Choose a slideshow to test")
		[ "$slideshow" = "" ] | [ "$slideshow" = "(null)" ] && exit
fi

language=$2
if [ -n "$language" ]
	then
		make test.$slideshow.$language
	else
		make clean
		make test.$slideshow
fi