#!/bin/sh Domain () { A=$1 while test $A != "." -a $A != "http:" -a $A != "https:" do domain=$A A=$(dirname $A) done echo $domain } eval $(echo "$QUERY_STRING"|awk -F'&' '{for(i=1;i<=NF;i++){print $i}}') [ $u ] && URL=$(/bin/busybox httpd -d $u) [ $URL ] || URL="http://shortcut.dabase.com" DOMAIN=$(Domain $URL) BASE64=$(echo $DOMAIN | base64) cat < G1 homescreen shortcut generator BETA

$URL

END if test ! -e ico/$BASE64.ico then echo "
"
wget $DOMAIN/favicon.ico -O ico/$BASE64.ico 2> /dev/stdout || exit
echo "
" fi if test ! -e png/$BASE64.png then echo "
convert -alpha on -resize 32x32! -sharpen 10 ico/$BASE64.ico png/$BASE64.png
" convert -alpha on -resize 32x32! -sharpen 10 ico/$BASE64.ico png/$BASE64.png fi # There might be a couple of favicons in a favicon PNG=png/$BASE64.png if test ! -e $PNG then PNG=png/$BASE64-0.png fi cat <Created icon

Enter a URL to create a shortcut with an icon on your G1 home screen:

Why shortcut.dabase.com?

END