-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoinstall.sh
More file actions
executable file
·80 lines (65 loc) · 2.11 KB
/
autoinstall.sh
File metadata and controls
executable file
·80 lines (65 loc) · 2.11 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
76
77
78
79
80
#!/bin/bash
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
# Variables.
dir=~/dotfiles # dotfiles directory
olddir=~/dotfiles_old # old dotfiles backup directory
files="vimrc vim" # list of files/directories to symlink in homedir
# create dotfiles_old in homedir
if [ -d $olddir ]; then
echo "$olddir already exists, removing."
rm -rf $olddir
fi
mkdir -p $olddir
# change to the dotfiles directory
cd $dir
# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks
for file in $files; do
mv ~/.$file ~/dotfiles_old/
ln -s $dir/$file ~/.$file
done
if [ -d vim/bundle/Vundle.vim ]; then
echo "Pulling Vundle: "
cd vim/bundle/Vundle.vim
git pull
cd ../../..
else
echo "Cloning Vundle"
git clone git@github.com:VundleVim/Vundle.vim.git vim/bundle/Vundle.vim
fi
vim +PluginInstall! +qall
# Install pomodoro
case $(uname -s) in
Linux*) OS=Linux ;;
Darwin*) OS=Darwin ;;
*)
echo "OS not known"
exit 1
;;
esac
if [ "$OS" = "Linux" ]; then
echo "TODO: Install work/rest on linux."
elif [ "$OS" = "Darwin" ]; then
sudo ln -sf $PWD/mac-work.zsh /usr/local/bin/work
sudo ln -sf $PWD/mac-rest.zsh /usr/local/bin/rest
fi
echo
echo "dev tools versions"
printf "\npython\n"
printf "\tflake8 $(flake8 --version)\n"
printf "\t$(mypy -V)\n"
printf "\t$(black --version | tr '\n' ' ')\n"
printf "\nrust\n"
printf "\t$(rust-analyzer --version)\n"
printf "\t$(rustfmt --version)\n"
printf "\ngo\n"
printf "\t$(gopls version | tr '\n' ' ')\n"
printf "\nracket\n"
printf "\tracket-langserver "$(racket -e "(require setup/getinfo) (require pkg/lib) ((get-info/full (pkg-directory \"racket-langserver\")) 'version)")"\n"
printf "\traco fmt "$(racket -e "(require setup/getinfo) (require pkg/lib) ((get-info/full (pkg-directory \"fmt\")) 'version)")"\n"
printf "\nbash\n"
printf "\tbash-language-server $(bash-language-server -v)\n"
printf "\tshfmt $(shfmt --version)\n"
printf "\njavascript/typescript\n"
printf "\teslint $(eslint -v)\n"
printf "\tbiome $(biome --version)\n"
# TODO: css, html, markdown, JSON, LaTeX, R, rst, sql, terraform, vimscript, yaml, vue, react