#!/bin/sh shoes_host="http://shoes.heroku.com" shoes_url="$shoes_host/pkg/policeman/linux/shoes-novideo" this_dir=`pwd` shoes="$(which shoes)" if [ -x "$this_dir/shoes" ] ; then shoes="$this_dir/shoes" fi if [ -z "$shoes" ] ; then shoes="$HOME/.shoes/shoes.run" fi if [ ! -x "$shoes" ] ; then echo "Downloading Shoes... " # First, try wget. wget="wget -q -O -" wdl="wget -q" shoes_pkg="$($wget "$shoes_url" 2>/dev/null)" if [ -z "$shoes_pkg" ] ; then # Then, try curl. wget="curl -s" wdl="curl -s -O" shoes_pkg="$($wget "$shoes_url" 2>/dev/null)" if [ -z "$shoes_pkg" ] ; then # Lastly, try bsd fetch. wget="fetch -q -o -" wdl="fetch -q" shoes_pkg="$($wget "$shoes_url" 2>/dev/null)" if [ -z "$shoes_pkg" ] ; then echo "sorry, couldn't find wget or curl." exit 1; fi fi fi #shoes_run="$shoes_host$shoes_pkg" shoes_run="$shoes_pkg" echo "Fetching $shoes_run..." mkdir -p $HOME/.shoes eval $wget "$shoes_run" > $shoes chmod 755 $shoes fi eval $shoes -- "$this_dir/#{SCRIPT}"