fix update
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Purpose : Apply gnome-settings.dconf only if it has changed since last applied
|
||||
# (tracked via an MD5 checksum so user tweaks aren't overwritten every run)
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
SRC="$SCRIPT_DIR/gnome-settings.dconf"
|
||||
CHECKSUM_FILE="$SCRIPT_DIR/.gnome-settings.md5"
|
||||
|
||||
if [ ! -f "$SRC" ]; then
|
||||
echo "Error: $SRC not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CURRENT_SUM=$(md5sum "$SRC" | awk '{print $1}')
|
||||
STORED_SUM=$(cat "$CHECKSUM_FILE" 2>/dev/null)
|
||||
|
||||
if [ "$CURRENT_SUM" != "$STORED_SUM" ]; then
|
||||
echo "GNOME settings have changed, applying..."
|
||||
dconf load /org/gnome/shell/extensions/ < "$SRC"
|
||||
echo "$CURRENT_SUM" > "$CHECKSUM_FILE"
|
||||
else
|
||||
echo "GNOME settings unchanged, skipping."
|
||||
fi
|
||||
Reference in New Issue
Block a user