-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·49 lines (37 loc) · 1.18 KB
/
deploy.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
#!/usr/bin/env bash
## Check to see if git, tmux, keychain, zsh, and wget are installed, prompt to install if not
## pkglist = vim, tmux, zsh, git, keychain
## maybe a case statement here instead
## for s in
## Send notice about package checking and install
apt-get update && apt-get upgrade -y
cat<<EOF> "$HOME"/pkglist
python-pip
zsh
git
tmux
keychain
python-dev
vim
wget
exuberant-ctags
EOF
for i in `cat "$HOME"/pkglist`; do
if [[ $(dpkg-query -W -f='${Status}' "$i" 2>/dev/null | grep -c "ok installed") = "1" ]]; then
echo "$i" already installed
else
echo "$i" not installed, installing now;
sudo apt-get install -y "$i"
fi; done
ssh-keygen -b 2048 -N '' -f "$HOME"/.ssh/id_rsa -t rsa -q
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> "$HOME"/.ssh/config
## Grab repo with prezto setup
git clone --recursive https://github.com/greyhound-forty/moonbase.git "${MOONBASE:-$HOME}/.moonbase"
chsh -s /bin/zsh
if [[ -f "$HOME"/.zshrc ]]; then
rm -f "$HOME"/.zshrc
fi
chmod +x "$HOME"/.moonbase/post_install.zsh
/bin/zsh "$HOME"/.moonbase/post_install.zsh
curl -s ping.gg/[email protected] >/dev/null 2>&1
sleep 60 && shutdown -r now