Make sure the user really wants to run the remote update

This commit is contained in:
dr460nf1r3 2021-07-11 11:42:04 +02:00
parent d9a3fbc933
commit 3008d02fee
No known key found for this signature in database
GPG Key ID: BE75B9D9767036C2
3 changed files with 11 additions and 5 deletions

View File

@ -2,7 +2,7 @@
# Maintainer: Librewish <librewish@gmail.com>
pkgname=garuda-common-settings
pkgver=1.4.2
pkgver=1.4.3
pkgrel=1
arch=('any')
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"

View File

@ -18,7 +18,7 @@ post_install() {
systemctl enable nohang-desktop
systemctl enable preload
systemctl enable prelockd
}
}
post_upgrade() {
msg "Disable conflicting services..."
@ -54,6 +54,6 @@ post_upgrade() {
echo ""
msg "Done!
This update replaces systemd-swap with zram-generator & makes irqbalance, uresourced and ananicy optdepends. If please remove the resulting orphans after this update by using the Garuda Assistant option!"
This update replaces systemd-swap with zram-generator & makes irqbalance, uresourced and ananicy optdepends. Please remove the resulting orphans after this update by using the Garuda Assistant option!"
echo ""
}

View File

@ -1,7 +1,13 @@
#!/bin/bash
# Run the "I'm too lazy to fix it myself all in one" script
if [ "$1" == "remote" ]; then
exec sudo bash -c "VERSION=1 . <(wget -qO- https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-common-settings/-/snippets/2147440/raw/main/remote-update) \"$2\""
echo "This will reset a lot of configurations to default ones - it is intended to be a oneclick fix for all kind of update issues. 🛑"
echo "Are you sure that you want to execute the remote update? (y/n)"
echo "Otherwise we will proceed with the regular update."
read yusure
if [ $yusure = "y" ]; then
exec sudo bash -c "VERSION=1 . <(wget -qO- https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-common-settings/-/snippets/2147440/raw/main/remote-update) \"$2\""
fi
fi
# Check for AUR helper