-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·53 lines (48 loc) · 1.33 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·53 lines (48 loc) · 1.33 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
#!/bin/bash
if [[ $1 == "linode" ]]; then
type='linode'
elif [[ $1 == "pi" ]]; then
type='pi'
else
type='cs'
fi
if [[ $type == 'cs' ]]; then
sudo apt update
sudo apt install python3-dev python3-pip python3-setuptools -y
sudo apt install vim nodejs npm tmux -y
ZSH_CUSTOM="$HOME/.oh-my-zsh/custom"
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
wget -P /tmp https://starship.rs/install.sh
chmod u+x /tmp/install.sh
/tmp/install.sh -y
fi
files=( ".tmux-git" ".tmux-git.conf" ".tmux.conf" ".tmux.theme.sh" ".bash_profile" ".gitconfig" ".gitignore" ".vim" ".vimrc" ".tmux.conf" ".goto_shortcuts" ".zshrc" )
for i in "${files[@]}"
do
if [ ! -L ~/$i ]
then
mv ~/$i /tmp/
fi
if [[ $type == 'cs' ]]; then
ln -s "/workspaces/.codespaces/.persistedshare/dotfiles/$i" ~/$i
elif [[ $type == 'pi' ]]; then
ln -s "/home/pi/dotfiles/$i" ~/$i
else
ln -s "/home/protitude/dotfiles/$i" ~/$i
fi
echo "linked $i"
done
if [ ! -d bundle ]
then
mkdir .vim/bundle
git clone https://github.com/VundleVim/Vundle.vim.git .vim/bundle/Vundle.vim
fi
if [ ! -L $1.vim/bundle/vim-multiple-cursors ]
then
vim +PluginInstall +qall
fi
if [[ $type == 'linode' ]]; then
if test -f "linode-setup.sh"; then
./linode-setup.sh
fi
fi