fix enable gnome-shell-extensions

This commit is contained in:
Jakobus Schürz 2020-03-05 12:53:58 +01:00
parent b0b180f056
commit 467aa2e534

View file

@ -557,10 +557,17 @@ gnome-shell-extensions-make-actual-permanent-systemwide() {
sudo mkdir -p '/etc/dconf/db/local.d'
if [ -e "${file}" ] ; then
sudo sed -i -e "/${line}/d" "${file}"
sudo sed -i -e "/\[org\/gnome\/shell\]/d" "${file}"
#sudo sed -i -e "/\[org\/gnome\/shell\]/d" "${file}"
fi
local EXTENSIONS=$(gsettings get org.gnome.shell enabled-extensions)
echo "[org/gnome/shell]" | sudo tee -a "${file}"
echo "${EXTENSIONS}" | sudo tee -a "${file}"
line="[org/gnome/shell]"
command="grep -xqF -- ${line} ${file} || echo $line >> $file"
sudo sh -c "$command"
local line='enabled-extensions='
echo "Update or add extensions"
#echo "${line}${EXTENSIONS}" | sudo tee -a "${file}"
sudo sed -i "/\[org\/gnome\/shell\]/a${line}${EXTENSIONS}" "${file}"
sudo dconf update
}
#EOF