diff --git a/dist/deb/debian.postinst b/dist/deb/debian.postinst index 9e67fac..703ef88 100644 --- a/dist/deb/debian.postinst +++ b/dist/deb/debian.postinst @@ -7,9 +7,34 @@ #db_get packagename/question1 #ANSWER1=$RET -DEB_VENDOR=$(cat /etc/dpkg/origins/default | grep Vendor: | sed -e "s/Vendor: //") +#DEB_VENDOR=$(cat /etc/dpkg/origins/default | grep Vendor: | sed -e "s/Vendor: //") -if [ "$DEB_VENDOR" = "Debian" ] ; then - gnome-shell-extension-tool -e ubuntu-appindicator@ubuntu.com - touch /maxime-was-here +#if [ "$DEB_VENDOR" = "Debian" ] ; then +#fi + +EXTENSION="ubuntu-appindicator@ubuntu.com" +CONF_DIR=/etc/dconf/db/local.d +CONF_FILE=00-extensions + +if [ -f $CONF_DIR/$CONF_FILE ] ; then + # + # Edit extensions file + # + grep -q $EXTENSION $CONF_DIR/$CONF_FILE + if [ "$?" == "1" ] ; then + echo "Add" + + sed -i -e "s/\(enabled-extensions=\[.*\)\]/\1, '${EXTENSION}'\]/" $CONF_DIR/$CONF_FILE + fi +else + # + # Generate extensions file + # + mkdir -p $CONF_DIR + cat >$CONF_DIR/$CONF_FILE <