-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·164 lines (149 loc) · 3.85 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#----------------------------------------
# Installation script that I use to setup
# my Lenovo Thinkpad T470 / T490
#----------------------------------------
INSTALL_OFFICIAL_PACKAGES=false
INSTALL_AUR_PACKAGES=false
# -------------------------------
# Installing the packages I need.
# -------------------------------
if [[ "$INSTALL_OFFICIAL_PACKAGES" == true ]]; then
sudo pacman -S --noconfirm \
acpid \
alsa-utils \
alacritty \
ansible \
aws-cli \
base \
base-devel \
bc \
bluez \
bluez-utils \
brightnessctl \
ccls \
chromium \
curl \
dmidecode \
docker \
doctl \
dunst \
entr \
fd \
feh \
firefox \
fontconfig \
fwupd \
fzf \
github-cli \
go \
gopls \
grub \
haskell-language-server \
htop \
inotify-tools \
jq \
keychain \
kubectl \
libva-utils \
linux-firmware-qlogic \
luarocks \
make \
man-db \
marksman \
mpv \
neovim \
nitrogen \
nodejs \
noto-fonts-emoji \
npm \
pandoc-cli \
pavucontrol \
php \
picom \
playerctl \
r \
ranger \
ripgrep \
rsync \
s3cmd \
scrot \
shellcheck \
sway \
sxiv \
task \
terraform \
tlp \
tree \
unzip \
wget \
wireguard-tools
fi
if [[ "$INSTALL_AUR_PACKAGES" == true ]]; then
if [[ ! -x $(command -v yay) ]]; then
echo "Stopping :: Please install the yay package"
exit
else
yay -S --noconfirm \
aic94xx-firmware \
ast-firmware \
phpactor \
python-sqlglot \
quarto-cli-bin \
r-styler \
signal-desktop \
upd72020x-fw \
wd719x-firmware
echo "Complete :: Required Yay packages."
fi
fi
# -------------------------------------
# Remove default ~/.local/bin as I have
# my dotfiles version.
# -------------------------------------
if [[ -e $HOME/.local/bin ]]; then
rm -rf "$HOME"/.local/bin
echo "Removed :: Old local bin folder."
fi
# --------------------------------
# Ensure a ~/.config folder exists
# --------------------------------
if [[ ! -e $HOME/.config ]]; then
mkdir -p "$HOME"/.config
echo "Created :: .config folder."
fi
# Symlink all my dotfiles.
ln -sf "$PWD/sway" "$HOME/.config/" && echo "Symlinked sway config."
ln -sf "$PWD/nvim" "$HOME/.config/" && echo "Symlinked nvim config."
ln -sf "$PWD/wallpapers" "$HOME/.config/" && echo "Symlinked wallpapers."
ln -sf "$PWD/scripts" "$HOME/.local/bin" && echo "Symlinked scripts folder."
ln -sf "$PWD/ranger" "$HOME/.config/" && echo "Symlinked ranger folder."
ln -sf "$PWD/.tmux.conf" "$HOME/.tmux.conf" && echo "Symlinked tmux config."
ln -sf "$PWD/.bashrc" "$HOME/.bashrc" && echo "Symlinked bashrc config."
ln -sf "$PWD/.vimrc" "$HOME/.vimrc" && echo "Symlinked vimrc config."
ln -sf "$PWD/.inputrc" "$HOME/.inputrc" && echo "Symlinked inputrc config."
ln -sf "$PWD/.xinitrc" "$HOME/.xinitrc" && echo "Symlinked xinitrc config."
ln -sf "$PWD/.Xresources" "$HOME/.Xresources" && echo "Symlinked Xresources config."
ln -sf "$PWD/alacritty" "$HOME/.config/" && echo "Symlinked alacritty folder."
ln -sf "$PWD/lynx" "$HOME/.config/" && echo "Symlinked lynx folder."
ln -sf "$PWD/dunst" "$HOME/.config/" && echo "Symlinked dunst folder."
ln -sf "$PWD/task" "$HOME/.config/" && echo "Symlinked task folder."
# SSH Key Generation
# ssh-keygen -t rsa -f "$HOME"/.ssh/marnie -C "Marnie" -b 4096
# GPG key setup
# Might use a YubiKey
# Git config global settings (dotfile?)
# add the include into ssh config
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
then
>&2 echo 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
sudo mv composer.phar /usr/local/bin/composer
echo "This setup file is not yet complete."