More comprehensive failed-extension storage
This commit is contained in:
parent
b2c731f6ac
commit
49ccb01787
|
@ -159,6 +159,20 @@ function sync-history {
|
||||||
fc -R # Read from new history file
|
fc -R # Read from new history file
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install-extension {
|
||||||
|
local ext="$1"
|
||||||
|
local file="$1.zip"
|
||||||
|
if ! gnome-extensions install --force ${ext}.zip; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if ! gnome-extensions list | grep --quiet ${ext}; then
|
||||||
|
if ! busctl --user call org.gnome.Shell.Extensions /org/gnome/Shell/Extensions org.gnome.Shell.Extensions InstallRemoteExtension s ${ext}; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
gnome-extensions enable ${ext}
|
||||||
|
}
|
||||||
|
|
||||||
function load-extensions {
|
function load-extensions {
|
||||||
if ! command -v gnome-extensions &> /dev/null; then
|
if ! command -v gnome-extensions &> /dev/null; then
|
||||||
echo "gnome-extensions is not installed!"
|
echo "gnome-extensions is not installed!"
|
||||||
|
@ -176,12 +190,10 @@ function load-extensions {
|
||||||
echo "$ext" >> "$HOME/.unavailable-extensions"
|
echo "$ext" >> "$HOME/.unavailable-extensions"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
gnome-extensions install --force ${EXTENSION_ID}.zip
|
if ! install-extension "$ext"; then
|
||||||
if ! gnome-extensions list | grep --quiet ${ext}; then
|
echo "$ext" >> "$HOME/.unavailable-extensions"
|
||||||
busctl --user call org.gnome.Shell.Extensions /org/gnome/Shell/Extensions org.gnome.Shell.Extensions InstallRemoteExtension s ${ext}
|
|
||||||
fi
|
fi
|
||||||
gnome-extensions enable ${ext}
|
rm ${ext}.zip
|
||||||
rm ${EXTENSION_ID}.zip
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue