Added missing files. Added snaphot before update.

This commit is contained in:
2024-11-26 21:39:54 +01:00
parent a3c6e2e8e5
commit b6ff30b80c
7 changed files with 129 additions and 26 deletions

View File

@@ -14,31 +14,37 @@ echo -e ' \e[H\e[2J
\e[1;32mCMtec CMBOX install/Update script\e[0;37m
'
# Create backup/snapshot
if pacman -Qs timeshift >/dev/null; then
printf -- '\033[33m Creating backup/snapshot\n\033[37m'
sudo timeshift --create --comments "Update script" --tags O
fi
# Update all pacman packages
printf -- '\033[33m Updating pacman packages\n\033[37m'
sudo pacman -Suyy --noconfirm
# Update all AUR packages
printf -- '\033[33m Updating AUR packages\n\033[37m'
if pacman -Qs yay >/dev/null; then
yay --noconfirm --aur
yay --noconfirm --aur
else
sudo pacman -S --needed --noconfirm git base-devel
if [ -d ~/yay-bin ]; then rm -rf ~/yay-bin; fi
cd ~
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg --noconfirm -si
cd ~
if [ -d ~/yay-bin ]; then rm -rf ~/yay-bin; fi
sudo pacman -S --needed --noconfirm git base-devel
if [ -d ~/yay-bin ]; then rm -rf ~/yay-bin; fi
cd ~
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg --noconfirm -si
cd ~
if [ -d ~/yay-bin ]; then rm -rf ~/yay-bin; fi
fi
# Update all Flatpak packages
printf -- '\033[33m Updating Flatpak packages\n\033[37m'
if pacman -Qs flatpak >/dev/null; then
flatpak update -y
flatpak update -y
else
sudo pacman --noconfirm --needed -S flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub com.github.tchx84.Flatseal
sudo pacman --noconfirm --needed -S flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub com.github.tchx84.Flatseal
fi
# Install initial system packages
@@ -62,8 +68,12 @@ yay --noconfirm -S --needed --aur adwaita-qt6-git
yay --noconfirm -S --needed --aur wlogout
mkdir -p ~/.config/hypr
ln -sf ~/code_server/wrappedhl ~/.local/bin/wrappedhl
ln -sf ~/code_server/config/hypr/hyprland.conf ~/.config/hypr/hyprland.conf
ln -sf ~/code_server/config/hypr/hypridle.conf ~/.config/hypr/hypridle.conf
ln -sf ~/code_server/config/gtk-3.0/settings.ini ~/.config/gtk-3.0/settings.ini
ln -sf ~/code_server/config/qt5ct/qt5ct.conf ~/.config/qt5ct/qt5ct.conf
ln -sf ~/code_server/config/qt6ct/qt6ct.conf ~/.config/qt6ct/qt6ct.conf
# Install rofi
printf -- '\033[33m Installing rofi\n\033[37m'
@@ -140,12 +150,12 @@ sudo mv virtualhereclient.service /etc/systemd/system/virtualhereclient.service
# Install teensy udev rules (only for non docker system)
if [ ! -f /.dockerenv ]; then
printf -- '\033[33m Installing teensy udev rules\n\033[37m'
sudo rm -f /tmp/00-teensy.rules /etc/udev/rules.d/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo wget -O /tmp/00-teensy.rules https://www.pjrc.com/teensy/00-teensy.rules
sudo install -o root -g root -m 0664 /tmp/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
printf -- '\033[33m Installing teensy udev rules\n\033[37m'
sudo rm -f /tmp/00-teensy.rules /etc/udev/rules.d/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo wget -O /tmp/00-teensy.rules https://www.pjrc.com/teensy/00-teensy.rules
sudo install -o root -g root -m 0664 /tmp/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
fi
# Install neovim
@@ -218,7 +228,6 @@ printf -- '\033[33m Installing ble.sh\n\033[37m'
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
cd ~
git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
#make -C ble.sh install PREFIX=~/.local
make -C ble.sh install
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
ln -sf ~/code_server/blerc ~/.blerc