-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
executable file
·64 lines (57 loc) · 1.29 KB
/
install
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
#!/bin/bash
if [ -n "$ZSH_VERSION" ]; then
echo "Installing for ZSH"
elif [ -n "$BASH_VERSION" ]; then
echo "Installing for BASH"
else
echo "Could not determine shell. Make sure to run using 'source'"
exit 0
fi
# link files
for file in $(find ~/.settings/config -type f)
do
if [ ! -f ~/$(basename $file) ]; then
ln -s $file ~
echo "$file linked"
else
echo "$file exists"
fi
done
# link executables
if [ ! -d ~/bin ]; then
mkdir -p ~/bin
echo "~/bin folder created"
else
echo "~/bin folder exists"
fi
for file in $(find ~/.settings/bin -type f)
do
if [ ! -f ~/bin/$(basename $file) ]; then
ln -s $file ~/bin
echo "$file linked"
else
echo "$file exists"
fi
done
if [ -n "$ZSH_VERSION" ]; then
if [ ! -f ~/.zshrc ]; then
# ln -s ~/.settings/profile ~/.zprofile
ln -s ~/.settings/zshrc ~/.zshrc
source ~/.zshrc
# echo "~/.zprofile linked"
echo "~/.zshrc linked"
else
echo "~/.zshrc exists"
fi
else
if [ ! -f ~/.profile ]; then
ln -s ~/.settings/profile ~/.profile
source ~/.profile
echo "~/.profile linked"
else
echo "~/.profile exists"
fi
fi
echo "Installing brew ..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install git nvm z httpie httpstat speedtest-cli