Skip to content

Instantly share code, notes, and snippets.

View krisutofu's full-sized avatar

Elmar krisutofu

View GitHub Profile
@krisutofu
krisutofu / .sh
Last active June 20, 2024 13:30
Script that safely updates with Pacman without crashes when using btrfs and snapper
#!/bin/bash
# This bash script bypasses the crashing problem when using BTRFS and Snapper with Pacman. Useful as long as the Pacman
# space computation bug is not fixed.
# This script expects only a single mountpoint to be updated, and only the root config of snapper to be used.
# `bc` (basic calculator) needs to be installed which did NOT come by default with my Garuda Plasma installation.
if [ $(id -u) != 0 ]; then
exec sudo -s "$0" "$@";
fi
# does not work, it will not show the dialog for unknown reason, same with send-notify