forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux-prerequisites
50 lines (38 loc) · 1.33 KB
/
linux-prerequisites
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/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