Update Ricing/backup-rice.sh

This commit is contained in:
Gabe committed 2026-10-22 01:20:49 +00:00
1 parent 0c01389b8a
commit 30d6008bc2
1 file changed
+4 -2
+4 -2
View File
@@ -36,11 +36,12 @@ rel_home () {
}
# dump <dconf path> <name> (skipped if dconf is missing or the path is empty)
# The home directory is replaced with __HOME__ so the file works for any username.
dump () {
if command -v dconf >/dev/null 2>&1; then
data=$(dconf dump "$1" 2>/dev/null || true)
if [ -n "$data" ]; then
printf '%s\n' "$data" > "$OUT/$2.dconf"
printf '%s\n' "$data" | sed "s#$HOME#__HOME__#g" > "$OUT/$2.dconf"
echo " settings: $1 -> $2.dconf"
fi
fi
@@ -81,8 +82,9 @@ if command -v hydrapaper >/dev/null 2>&1 || [ -d "$HOME/.config/hydrapaper" ]; t
add .var/app/org.gabmus.hydrapaper
# Find the source images it merges: any image path in its settings or config files.
# (The dconf file holds __HOME__ now, so swap the real path back in for this scan.)
CANDIDATES=$( {
[ -f "$OUT/hydrapaper.dconf" ] && cat "$OUT/hydrapaper.dconf"
[ -f "$OUT/hydrapaper.dconf" ] && sed "s#__HOME__#$HOME#g" "$OUT/hydrapaper.dconf"
find "$HOME/.config/hydrapaper" "$HOME/.local/share/hydrapaper" -type f -exec cat {} + 2>/dev/null
} | grep -aoE "(file://)?/[^'\",]+\.(png|jpe?g|webp|bmp)" || true )