-
Notifications
You must be signed in to change notification settings - Fork 4
/
go
executable file
·53 lines (40 loc) · 1.01 KB
/
go
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
#!/bin/bash
function cloneRepo() {
if [ ! -d ~/.files/ ]; then
echo "cloning https://github.com/aaronzirbes/dot-files.git to ~/.files"
git clone https://github.com/aaronzirbes/dot-files.git ~/.files
else
echo "~/.files/ already exists. skipping clone."
fi
}
function linkit() {
source_file="${1}"
dest_file="${2}"
if [ ! -e ~/${dest_file} ]; then
echo "Linking '${source_file}' to '${dest_file}'..."
ln -s ~/.files/${source_file} ~/${dest_file}
else
echo -e -n "${source_file} already exists\n\t"
ls -l ~/${source_file}
fi
}
function linkall() {
pushd ~/.files &> /dev/null
for file in .gitconfig \
.gitflow_export \
.gitignore_global \
.profile; do
linkit ${file} ${file}
done
linkit .profile .bashrc
popd &> /dev/null
}
function homebrew() {
pushd ~/.files &> /dev/null
brew bundle
popd &> /dev/null
}
cloneRepo
linkall
homebrew
echo "Done!"