-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·75 lines (62 loc) · 1.75 KB
/
install.sh
File metadata and controls
executable file
·75 lines (62 loc) · 1.75 KB
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
65
66
67
68
69
70
71
72
73
74
75
#!/bin/sh
set -ea
# Source paths
export YO=`pwd`
export YO_BASH="$YO/bash"
export YO_CODE="$YO/code"
export YO_ZSH="$YO/zsh"
export YO_GIT="$YO/git"
export YO_SSH="$YO/ssh"
export YO_SUBL="$YO/sublime-text"
# Target paths
MY_HOME="$HOME"
if [ -z "$MY_HOME" ]; then
MY_HOME="~"
fi
export MY_BIN="$MY_HOME/.bin"
export MY_ANTIDOTE="$MY_HOME/.antidote"
export MY_ZSH="$MY_HOME/.its-my-zsh"
export MY_SSH="$MY_HOME/.ssh"
export MY_SUBL="$MY_HOME/.config/sublime-text-3"
export MY_SUBL_INS="$MY_SUBL/Installed\ Packages"
export MY_SUBL_PKG="$MY_SUBL/Packages"
echo "\033[1;36mUserland Configuration and More...\033[0m"
# Set up SSH
echo "\033[0;33mSetting up SSH...\033[0m"
if [ ! -d "$MY_SSH" ]; then
mkdir "$MY_SSH"
fi
mkdir "$MY_SSH/controlmasters"
ln -s "$YO_SSH/config" "$MY_SSH/config"
# Set up git
echo "\033[0;35mConfiguring git...\033[0m"
ln -s "$YO_GIT/gitignore" "$MY_HOME/.gitignore"
ln -s "$YO_GIT/gitconfig" "$MY_HOME/.gitconfig"
# Set up .bin
echo "\033[0;37mCreating local executables...\033[0m"
if [ ! -d "$MY_BIN" ]; then
mkdir "$MY_BIN"
fi
if [ ! -d "$MY_HOME" ]; then
mkdir "$MY_BIN"
fi
echo "\033[1;35mConfiguring VS Code...\033[0m"
mkdir -p "$MY_HOME/.config/Code/User"
ln -s "$YO_CODE/settings.json" "$MY_HOME/.config/Code/User/settings.json"
# Setup ZSH
echo "\033[1;35mConfiguring ZSH...\033[0m"
git clone --depth=1 https://github.com/mattmc3/antidote.git ${MY_ANTIDOTE}
ln -s "$YO_ZSH/plugins_rc" "$MY_HOME/.zsh_plugins.txt"
ln -s "$YO_ZSH/zshrc" "$MY_HOME/.zshrc"
ln -s "$YO_ZSH" "$MY_ZSH"
ZSH_PATH=`which zsh`
if [ $SHELL != $ZSH_PATH ]; then
echo "\033[1;35mYour password may be required to set zsh as default\033[0m"
chsh -s $ZSH_PATH
fi
if [ -d "/Users" ]; then
./install_macos.sh
else
./install_linux.sh
fi
echo 'Setup complete'