forked from sagevann/osxprovision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovision_os_x.sh
executable file
·72 lines (55 loc) · 1.55 KB
/
provision_os_x.sh
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
echo "Provisioning Setup..."
# paths
dirname=$(pwd)
lib="/usr/local/lib"
bin="/usr/local/bin"
# make in case they aren't already there
mkdir -p "/usr/local/lib"
mkdir -p "/usr/local/bin"
set -e
# modules
source "lib/symlink/index.sh"
# ------------------------------------------------------
# Set defaults
#
echo "Making your Mac dev machine awesome ... "
sh "defaults.sh"
echo "Install all AppStore Apps at first!"
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
# install wallpaper cli
sudo gem install desktop
# ------------------------------------------------------
# Binaries
#
echo "Install Homebrew, Postgres, wget and cask, node"
sh "binaries.sh"
# ------------------------------------------------------
# Core Functionality
#
echo "Install Core Apps"
sh "apps.sh"
# TODO: install jdk 7, 8, and switch command to change between 6,7,8
#brew cask install --appdir="~/Applications" java
# Link Cask Apps to Alfred
brew cask alfred link
# ------------------------------------------------------
# cleanup
#
echo "Clean up from installing"
brew cleanup --force
rm -f -r /Library/Caches/Homebrew/*
# ------------------------------------------------------
# Profile / .bash_profile
#
echo "Add .bash_profile if it doesn't already exist"
# Symlink the profile
if [[ ! -e "$HOME/.bash_profile" ]]; then
echo "creating profile.sh from $HOME/.bash_profile"
sudo cp -R "profile.sh" "$HOME/.bash_profile"
source $HOME/.bash_profile
else
echo "$HOME/.bash_profile already exists. remove and run again."
fi