+ case $shrink_host in
+ 2tu.us)
+ local submit="http://2tu.us/?save=y&url=$url"
+ local res=$(wget -q -O - "$submit" | awk -F"'" '/Your tight URL is:/ { print $2 }')
+ ;;
+ bit.ly|j.mp)
+ if [ -z "$shrink_bitly_login" -o -z "$shrink_bitly_key" ]; then
+ echo "To use $shrink_host you must set 'shrink_bitly_login' and 'shrink_bitly_key' in ~/.bti" >&2
+ exit 1
+ fi
+ local submit="http://api.bit.ly/v3/shorten?format=txt&login=$shrink_bitly_login&apiKey=$shrink_bitly_key&domain=$shrink_host&longUrl=$url"
+ local res=$(wget -q -O - "$submit")
+ ;;
+ *)
+ echo "Shrinking with $shrink_host is not supported." >&2
+ exit 1
+ ;;
+ esac