forked from tetsuya669/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
48 lines (37 loc) · 973 Bytes
/
install.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
#!/bin/bash
set -eu
# 実行場所のディレクトリを取得
THIS_DIR=$HOME/dotfiles
if [ ! -d "$THIS_DIR" ]; then
git clone https://github.com/ooyodo/dotfiles.git "$THIS_DIR"
else
echo "$THIS_DIR already downloaded. Updating..."
cd "$THIS_DIR"
git stash
git checkout master
git pull origin master
echo
fi
cd $THIS_DIR
echo "start setup..."
for f in .??*
do
[[ "$f" == ".DS_Store" ]] && continue
[[ "$f" == ".aws" ]] && continue
[[ "$f" == ".git" ]] && continue
[[ "$f" == ".ssh" ]] && continue
ln -snfv "$THIS_DIR/$f" ~/
done
# install homebrew
if ! command -v brew > /dev/null 2>&1; then
# Install homebrew: https://brew.sh/
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo
fi
brew bundle
echo
cat << END
**************************************************
DOTFILES SETUP FINISHED! bye.
**************************************************
END