forked from hexorx/dotfiles-old
/
get.dotfiles.sh
52 lines (45 loc) · 1017 Bytes
/
get.dotfiles.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
# Downloads dotfiles repository to current directory, then links dot-files
# into current user's home directory.
#
# Requires git.
#
# Easy run:
#
# curl https://raw.github.com/wasbazi/dotfiles/master/get.dotfiles.sh | sh
REPO_OWNER="wasbazi"
REPO_HOST="github.com"
REPO_NAME="dotfiles"
REPO_DIR=~/$REPO_NAME
GIT_REPO_URL="git@$REPO_HOST:$REPO_OWNER/$REPO_NAME.git"
if [ ! -d ~/dotfiles ]; then
echo "\033[32mDownloading repository."
echo "\033[0m"
git clone $GIT_REPO_URL $REPO_DIR
fi
echo "\033[32mDotfiles installed!"
echo "\033[0m"
SCRIPT_DIR="$REPO_DIR/scripts/setup"
if [ ! -z "$1" ]; then
case "$1" in
essential)
$SCRIPT_DIR/essential-programs.sh
;;
links)
$SCRIPT_DIR/links.sh
;;
zsh)
$SCRIPT_DIR/oh-my-zsh.sh
;;
vim)
$SCRIPT_DIR/vim.sh
;;
*)
echo $"Usage: $0 {essential|links|zsh|vim}"
exit 1
esac
exit 0
fi
$SCRIPT_DIR/essential-programs.sh
$SCRIPT_DIR/links.sh
$SCRIPT_DIR/oh-my-zsh.sh
$SCRIPT_DIR/vim.sh