-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·58 lines (48 loc) · 1.48 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
#!/usr/bin/env zsh
# run as sudo (for brew install and all...)
sudo -v
# motd
echo -ne "\u001b[38;5;220m"
cat << 'EOF'
▄██ ▄ ███▄▄▄▄ ▄█ ▄█▄
███ ██▄ ███▀▀▀██▄ ███ ▄███▀
EOF
echo -ne "\u001b[38;5;214m"
cat << 'EOF'
███▄▄▄███ ███ ███ ███▐██▀
▀▀▀▀▀▀███ ███ ███ ▄█████▀
EOF
echo -ne "\u001b[38;5;39m"
cat << 'EOF'
▄██ ███ ███ ███ ▀▀█████▄
███ ███ ███ ███ ███▐██▄
EOF
echo -ne "\u001b[38;5;32m"
cat << 'EOF'
███ ███ ███ ███ ███ ▀███▄
▀█████▀ ▀█ █▀ ███ ▀█▀
▀
EOF
echo -ne "\e[0m"
# bootstrap
__="$HOME/Library/Mobile Documents/com~apple~CloudDocs/.__/dotfiles"
export __=$__
# testing git install
which git >> /dev/null 2>&1
if [ "$?" -eq 1 ];then
# no git, must install terminal tools
sudo xcode-select --install
fi
if [ ! -d $__/.git ]; then
rm -fr $__ >> /dev/null # 2>&1
mkdir -p $__ >> /dev/null # 2>&1
git clone https://github.com/y-nk/__.git $__ >> /dev/null 2>&1
fi
cd $__
git pull >> /dev/null # 2>&1
source ./.apply
apply_all
source $HOME/.zshrc
# allow for future push
git remote remove origin
git remote add origin [email protected]:y-nk/__.git