-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdot
More file actions
50 lines (41 loc) · 986 Bytes
/
dot
File metadata and controls
50 lines (41 loc) · 986 Bytes
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
#!/bin/sh
# dot
# https://github.com/holman/dotfiles/blob/master/bin/dot
# `dot` handles installation, updates, things like that. Run it periodically
# to make sure you're on the latest and greatest.
set -e
parentDirectory="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P)"
dotfilesDirectory="$(cd "$( dirname "$parentDirectory" )" && pwd -P)"
displayUsageAndExit() {
echo "dot -- dotfiles management"
echo ""
echo "Usage: dot [options]"
echo ""
echo "Options:"
echo " -e, --edit Open dotfiles directory for editing"
echo " -h, --help Show this help message and exit"
exit
}
while test $# -gt 0; do
case "$1" in
"-h"|"--help")
displayUsageAndExit
;;
"-e"|"--edit")
exec "$EDITOR" "$dotfilesDirectory"
exit
;;
*)
echo "Invalid option: $1"
displayUsageAndExit
;;
esac
shift
done
export ZSH=$HOME/.dotfiles
# Set macOS defaults
$ZSH/macos/settings
# Set Xcode defaults
$ZSH/xcode/defaults
# Install homebrew
$ZSH/brew/install.sh