#!/bin/sh
### end common-components/sh-shebang

# Welcome to the thoughtbot laptop script! Be prepared to turn your laptop (or
# desktop, no haters here) into an awesome development machine.

# This file is auto-generated. Do not edit it by hand unless you know what
# you're doing. Please see 'CONTRIBUTING.md' for more information.
### end common-components/header

trap 'ret=$?; test $ret -ne 0 && printf "failed\n\n" >&2; exit $ret' EXIT

set -e
### end common-components/exit-trap

fancy_echo() {
  printf "\n%b\n" "$1"
}
### end common-components/shared-functions

if ! grep -qiE 'precise|quantal|wheezy|raring|jessie' /etc/os-release
then
  fancy_echo "Sorry! we don't currently support that distro."
  exit 1
fi
### end linux-components/distro-check

fancy_echo "Updating system packages ..."
  if command -v aptitude >/dev/null; then
    fancy_echo "Using aptitude ..."
  else
    fancy_echo "Installing aptitude ..."
    sudo apt-get install -y aptitude
  fi
  sudo aptitude update
### end linux-components/debian-package-update

fancy_echo "Installing curl ..."
  sudo aptitude install -y curl

fancy_echo "Installing zsh ..."
  sudo aptitude install -y zsh

fancy_echo "Changing your shell to zsh ..."
  chsh -s `which zsh`

fancy_echo "Your shell will now restart to apply changes."
  exec `which zsh` -l
### end linux-components/debian-prerequisites