Update file run_onchange_after_25-gnome-extension-settings.tmpl

This commit is contained in:
Brian Zalewski 2023-01-24 08:05:20 +00:00
parent b1be709544
commit b74852a82a

View file

@ -25,6 +25,9 @@ if [ -f "$HOME/.config/desktop/gnome.yml" ]; then
EXT_URL="$(cat "$TMP" | jq -r '.url')" EXT_URL="$(cat "$TMP" | jq -r '.url')"
EXT_ID="$(cat "$TMP" | jq -r '.regex')" EXT_ID="$(cat "$TMP" | jq -r '.regex')"
echo "$EXT_URL" >> /tmp/install-gnome-extensions.txt echo "$EXT_URL" >> /tmp/install-gnome-extensions.txt
if [ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions" ]; then
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions"
fi
find "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions" -mindepth 1 -maxdepth 1 -type d | while read EXT_FOLDER; do find "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions" -mindepth 1 -maxdepth 1 -type d | while read EXT_FOLDER; do
if [[ "$EXT_FOLDER" == *"$EXT_ID"* ]] && [ -f /tmp/install-gnome-extensions.txt ]; then if [[ "$EXT_FOLDER" == *"$EXT_ID"* ]] && [ -f /tmp/install-gnome-extensions.txt ]; then
TMP_EXT="$(mktemp)" TMP_EXT="$(mktemp)"
@ -45,6 +48,8 @@ fi
### Install the GNOME extensions using the `install-gnome-extensions` script ### Install the GNOME extensions using the `install-gnome-extensions` script
if command -v install-gnome-extensions > /dev/null; then if command -v install-gnome-extensions > /dev/null; then
if [ -f /tmp/install-gnome-extensions.txt ]; then if [ -f /tmp/install-gnome-extensions.txt ]; then
logg info 'Running the `install-gnome-extensions` script'
cd /tmp
install-gnome-extensions --enable --overwrite --file /tmp/install-gnome-extensions.txt install-gnome-extensions --enable --overwrite --file /tmp/install-gnome-extensions.txt
rm -f /tmp/install-gnome-extensions.txt rm -f /tmp/install-gnome-extensions.txt
logg success 'Finished installing the GNOME extensions' logg success 'Finished installing the GNOME extensions'