23 lines
730 B
Bash
23 lines
730 B
Bash
#!/bin/bash
|
|
#avoid running as root
|
|
NO_FORMAT="\e[0m"
|
|
C_RED="\e[38;5;9m"
|
|
if [ "$UID" = 0 ]; then
|
|
echo -e "${C_RED}This script cannot be run as root.${NO_FORMAT}"
|
|
exit 1
|
|
fi
|
|
#update local update db
|
|
yay -Syy
|
|
#install outdated dep from provision server
|
|
yay -U https://prov.franscorack.com/pkg/automake-1.16.5-2-any.pkg.tar.zst --needed --noconfirm &&
|
|
#install client from custom PKGBUILD
|
|
mkdir $HOME/urbackuptemp
|
|
wget https://cdn.franscorack.com/pkg/urbackup/PKGBUILD
|
|
cd ~/urbackuptemp
|
|
makepkg -si &&
|
|
rm -rf $HOME/urbackuptemp
|
|
#enable & start systemd service
|
|
sudo systemctl enable urbackupclientbackend
|
|
sudo systemctl start urbackupclientbackend
|
|
#reinstall updated dep that was downgraded previously
|
|
yay -S automake --noconfirm |