-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.sh
executable file
·48 lines (40 loc) · 1.46 KB
/
setup.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
#!/usr/bin/env bash
#
# setup.sh: run the workstation setup
#
# Arguments:
# - a list of components to install, see scripts/opt-in/ for valid options
#
# Fail immediately if any errors occur
set -e # the shell will exit if a command fails
echo "Caching password..."
sudo -K # clobbers/deletes cached credentials
sudo true; # forces your sign in, runs trivial command
clear
MY_DIR="$(dirname "$0")" # selects the current directory (always seems to be current directory)
# prevents homebrew from collecting analytics
export HOMEBREW_NO_ANALYTICS=1
# Note: Homebrew needs to be set up first
source ${MY_DIR}/scripts/common/homebrew.sh # sourcing the script so it runs in the current shell
# Install everything else
source ${MY_DIR}/scripts/common/oh-my-zsh.sh
source ${MY_DIR}/scripts/common/editors.sh
source ${MY_DIR}/scripts/common/git.sh
source ${MY_DIR}/scripts/common/git-aliases.sh
source ${MY_DIR}/scripts/common/applications-common.sh
source ${MY_DIR}/scripts/common/developer-utilities.sh
source ${MY_DIR}/scripts/common/unix.sh
source ${MY_DIR}/scripts/common/configuration-osx.sh
# For each command line argument, try executing the corresponding script in opt-in/
for var in "$@"
do
echo "$var"
FILE=${MY_DIR}/scripts/opt-in/${var}.sh
echo "$FILE"
if [ -f $FILE ]; then
source ${FILE}
else
echo "Warning: $var does not appear to be a valid argument. File $FILE does not exist."
fi
done
source ${MY_DIR}/scripts/common/finished.sh