-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
90 lines (72 loc) · 2.12 KB
/
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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
DOTLOC=$HOME/repos/dotfiles
FUNPATH=/usr/local/share/zsh/site-functions
SCRIPT_ROOT=$(cd "$(dirname "$0")" || exit 1; pwd)
if [ -d "$SCRIPT_ROOT/setup" ]; then
SCRIPT_ROOT="$(dirname "${SCRIPT_ROOT}")"
fi
chmod +x ./os.sh
OS=$(./os.sh)
echo $OS
info() {
printf "\033[00;34m$@\033[0m\n"
}
doing() {
printf "\033[00;34m$@\033[0m\n"
}
if [ "$OS" == "ManjaroLinux" ]; then
echo "Configuring Manjaro"
# chmod +x ./os/arch/configure.sh
elif [ "$(uname)" == "Darwin" ]; then
echo "Configuring macOS"
chmod +x ./os/macos/install.sh
chmod +x ./os/macos/configure.sh
./os/macos/install.sh
./os/macos/configure.sh
elif [ "$(uname)" == "Linux" ]; then
echo "Configuring Linux"
chmod +x ./os/ubuntu/install.sh
./os/ubuntu/install.sh
fi
#install deno
curl -fsSL https://deno.land/x/install/install.sh | sh
# cleanup old prompt files
rm -rf ~/.oh-my-zsh
if [[ -x $FUNPATH/prompt_pure_setup && -x $FUNPATH/async ]]; then
rm -f $FUNPATH/prompt_pure_setup
rm -f $FUNPATH/async
fi
# install ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
doing "Installing completions..."
if [[ -x $FUNPATH/_repo ]]; then
rm -f $FUNPATH/_repo
fi
ln -s "$DOTLOC/completions/_repo" $FUNPATH/_repo
echo "linking ${DOTLOC}/.vimrc to ~/.config/nvim/init.vim"
rm -rf ~/.config/nvim/
mkdir ~/.config
mkdir ~/.config/nvim
ln -s $DOTLOC/.nvimrc ~/.config/nvim/init.vim
pip3 install neovim
# link required files
echo "Linking Files..."
for file in zshrc gitconfig
do
rm ~/.$file &>/dev/null
echo "linking -/home/julian/repos/dotfiles/.$file /home/julian/.$file"
ln -s "$DOTLOC/.$file" "$HOME/.$file"
done
# set executable
chmod +x ./bin/tat
# nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install node
nvm use node
# npm
npm i -g typescript typescript-language-server
# lazyvim
rm -rf ~/.config/nvim/*
git clone [email protected]:jinwood/lazyvim-config.git ~/.config/nvim
echo "done"