set browser {}

proc check-browser what {
	global browser
	if {[catch {exec which $what} results]} {
		set browser {}
		return
	}
	set browser $results 
}

check-browser firefox
if {$browser ne ""} {
	exec firefox http://dinisnoise.org/donate/ >& /dev/null &
	exit
}  

check-browser google-chrome
if {$browser ne ""} {
	exec google-chrome http://dinisnoise.org/donate/ >& /dev/null &
	exit
} else {
	echo Please visit http://dinisnoise.org/donate/ to make a donation!
}
