#!/bin/sh HOME=/tmp/tpope export HOME mkdir -p "$HOME" || exit 1 if [ ! -f "$HOME/. tpope" ]; then touch "$HOME/.sandbox" if [ -x "`which curl`" ]; then get="curl -s" else get="wget -qO -" fi $get http://c.tpope.net/tpope.tgz|gzip -dc|tar xf - -C "$HOME" "$HOME/bin/installer" >/dev/null fi for shell in /bin/bash /usr/bin/zsh /bin/zsh; do [ -x $shell ] && SHELL=$shell done export SHELL tty=`tty <&2` if [ "$#" -gt 0 ]; then exec "$@" <"$tty" elif [ "`uname`" = Darwin -a /usr/bin/screen = "`which screen 2>/dev/null`" ]; then # the screen shipped with OS X is broken exec $SHELL <"$tty" elif [ -z "$STY" -a -x "`which screen 2>/dev/null`" ]; then exec screen -xRR tpope <"$tty" else exec $SHELL <"$tty" fi