-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·103 lines (80 loc) · 2.55 KB
/
install.sh
File metadata and controls
executable file
·103 lines (80 loc) · 2.55 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/bash
#
# Basic Setup Script
#
MAC=0
LINUX=0
# Initial config prompts
read -p "Does this computer expect a yubikey? (y/n)" YUBIKEY
# MacOS / OSX
if [[ $(uname -s) == "Darwin" ]]; then
MAC=1
echo "export MAC=1" | tee -a ./config_vars.sh
echo "Accepting xcode license - root required"
sudo xcodebuild -license accept
brew update
INSTALL_COMMAND='brew install'
fi
# Ubuntu
if [[ -n $(command -v lsb_release) ]]; then
LINUX=1
echo "export LINUX=1" | tee -a ./config_vars.sh
sudo apt update
INSTALL_COMMAND='sudo apt install -y'
fi
# Docker & Generic Linux
if [[ "$(uname -s)" =~ .*"Linux".* ]]; then
LINUX=1
echo "export LINUX=1" | tee -a ./config_vars.sh
sudo apt update
INSTALL_COMMAND='sudo apt install -y'
fi
if [[ $YUBIKEY = y ]]; then
echo "export YUBIKEY_CLIENT=1" | tee -a ./config_vars.sh
# Yubico ppa
sudo apt-add-repository -y ppa:yubico/stable
mkdir ~/.gnupg
echo "enable-ssh-support" >> ~/.gnupg/gpg-agent.conf
fi
# Misc setup BS
mkdir -p ${HOME}/.config
# Install packages
echo "${INSTALL_COMMAND} ${LINE}"
echo "Running: ${INSTALL_COMMAND} $(paste -sd ' ' ./packagelist.txt)"
${INSTALL_COMMAND} $(paste -sd ' ' ./packagelist.txt)
# Some packages are named differently for each system.
if [[ "${LINUX}" == 1 ]]; then
${INSTALL_COMMAND} $(paste -sd ' ' ./linux_only_packagelist.txt)
# Linux master installer script
./linux_install.sh
elif [[ "${MAC}" == 1 ]]; then
${INSTALL_COMMAND} $(paste -sd ' ' ./mac_casklist.txt)
${INSTALL_COMMAND} $(paste -sd ' ' ./mac_only_packagelist.txt.txt)
fi
# Install Hack font
wget -O /tmp/Hack.zip https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip
if [[ "$LINUX" == 1 ]]; then
echo "sudo unzip -o /tmp/Hack.zip -d /usr/local/share/fonts"
sudo unzip -o /tmp/Hack.zip -d /usr/local/share/fonts
elif [[ "$MAC" == 1 ]]; then
unzip -o /tmp/Hack.zip -d ${HOME}/Library/Fonts
fi
# Install Python packages
# - break everything I WANT THESE EVERYWHERE ALL THE TIME
python3 -mpip install --break-system-packages --user $(paste -sd ' ' ./python_packagelist.txt)
# neovim config
./lsp_setup.sh
#
# Symlink dotfiles
#
rm -rf ~/.config/nvim
ln -s ${PWD}/neovim ~/.config/nvim
# Set Home Directory
ln -sf ${PWD}/pylintrc ~/.pylintrc
ln -sf ${PWD}/tmux.conf ~/.tmux.conf
ln -sf ${PWD}/shellrc ~/.zshrc
ln -sf ${PWD}/shellrc ~/.bashrc
mkdir -p ${HOME}/.config/ghostty
ln -sf ${PWD}/ghostty.conf ~/.config/ghostty/config
mkdir -p ${HOME}/.ipython/profile_default
ln -sf ${PWD}/ipython_config.py ${HOME}/.ipython/profile_default/ipython_config.py