-
Notifications
You must be signed in to change notification settings - Fork 0
/
.dots
executable file
·118 lines (111 loc) · 3.91 KB
/
.dots
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/env bash
function runDots() {
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Run sections based on command line arguments
for ARG in "$@"
do
if [ $ARG == "bootstrap" ] || [ $ARG == "all" ]; then
echo ""
echo "------------------------------"
echo "Syncing the dev-setup repo to your local machine."
echo "------------------------------"
echo ""
source ./bootstrap.sh
fi
if [ $ARG == "macosprep" ] || [ $ARG == "all" ]; then
# Run the macosprep.sh Script
echo ""
echo "------------------------------"
echo "Updating macOS and installing Xcode command line tools"
echo "------------------------------"
echo ""
./macosprep.sh
fi
if [ $ARG == "brew" ] || [ $ARG == "all" ]; then
# Run the brew.sh Script
# For a full listing of installed formulae and apps, refer to
# the commented brew.sh source file directly and tweak it to
# suit your needs.
echo ""
echo "------------------------------"
echo "Installing Homebrew along with some common formulae and apps."
echo "This might awhile to complete, as some formulae need to be installed from source."
echo "------------------------------"
echo ""
./brew.sh
fi
if [ $ARG == "macos" ] || [ $ARG == "all" ]; then
# Run the macos.sh Script
# I strongly suggest you read through the commented macos.sh
# source file and tweak any settings based on your personal
# preferences. The script defaults are intended for you to
# customize. For example, if you are not running an SSD you
# might want to change some of the settings listed in the
# SSD section.
echo ""
echo "------------------------------"
echo "Setting sensible macOS defaults."
echo "------------------------------"
echo ""
./macos.sh
fi
if [ $ARG == "node" ] || [ $ARG == "all" ]; then
# Run the node.sh Script
echo "------------------------------"
echo "Setting up Node.js development environment."
echo "------------------------------"
echo ""
./node.sh
fi
if [ $ARG == "ssh" ] || [ $ARG == "all" ]; then
# Run the ssh.sh Script
echo "------------------------------"
echo "Setting up ssh key."
echo "------------------------------"
echo ""
./ssh.sh
fi
if [ $ARG == "github" ] || [ $ARG == "all" ]; then
# Run the github.sh Script
echo "------------------------------"
echo "Setting up github public keys."
echo "------------------------------"
echo ""
./github.sh
fi
if [ $ARG == "bitbucket" ] || [ $ARG == "all" ]; then
# Run the bitbucket.sh Script
echo "------------------------------"
echo "Setting up bitbucket public keys."
echo "------------------------------"
echo ""
./bitbucket.sh
fi
if [ $ARG == "py" ] || [ $ARG == "all" ]; then
# Run the py.sh Script
echo "------------------------------"
echo "Setting up Python development environment."
echo "------------------------------"
echo ""
./py.sh
fi
done
echo "------------------------------"
echo "TODO: GoogleJapaneseIME setting"
echo "TODO: Some ssh key settings"
echo "TODO: Install Xcode from AppStore"
echo "TODO: Install LINE from AppStore"
echo "TODO: Login Slack teams: https://slack.com/signin/find"
echo "------------------------------"
echo "Completed running .dots, restart your computer to ensure all updates take effect"
echo "------------------------------"
}
read -p "This script may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
runDots $@
fi;
unset runDots;