-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
36 lines (33 loc) · 1.29 KB
/
update.sh
File metadata and controls
36 lines (33 loc) · 1.29 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
[ "$(id -u)" = 0 ] || { printf "Script needs to be run as root.\nExiting...\n" >&2; exit 1; }
apt update && apt upgrade
if snap version; then snap refresh; fi
cd /root/libtsm
if [ "$(git pull origin)" != "Already up to date." ]; then
meson setup build/
meson install -C build/
fi
cd /root/kmscon
if [ "$(git pull origin)" != "Already up to date." ]; then
meson setup build/
meson install -C build/
fi
ldconfig
cd /usr/share/fonts
JB_VER=$(curl -si https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip | grep -oP 'location: https://github.com/ryanoasis/nerd-fonts/releases/download/v\K.*(?=/JetBrainsMono.zip)')
if [ ! -d "JetBrainsMono$JB_VER" ]; then
rm -rf JetBrainsMono*
curl -fLO https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
unzip JetBrainsMono.zip -d JetBrainsMono$JB_VER && rm JetBrainsMono.zip
fc-cache -fv
fi
if [ -n "$1" ] && [ -d "/home/$1" ]; then
USR="$1"
elif [ -z "$1" ] && [ -n "$(ls /home)" ]; then
USR="$(ls /home | head -1)"
else
echo -e "User not found in /home\nExiting..." >&2
exit 1
fi
su -c "bash ~/.local/share/blesh/ble.sh --update" - $USR
clear
echo "Almost done! To update your plugins, in bash run upgrade_oh_my_bash, in tmux press Ctrl-b followed by (an uppercase) U, and in neovim run :Lazy sync"