From 1a31fc65e579b2d01460eab285255c2a5a62f06f Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Wed, 15 Apr 2020 23:54:02 +0200 Subject: [PATCH] Update DEB for Ubuntu --- dist/deb/debian.postinst | 75 +++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 21 deletions(-) diff --git a/dist/deb/debian.postinst b/dist/deb/debian.postinst index 703ef88..3f847c0 100644 --- a/dist/deb/debian.postinst +++ b/dist/deb/debian.postinst @@ -9,32 +9,65 @@ #DEB_VENDOR=$(cat /etc/dpkg/origins/default | grep Vendor: | sed -e "s/Vendor: //") -#if [ "$DEB_VENDOR" = "Debian" ] ; then -#fi +if [ "$DEB_VENDOR" = "Debian" ] ; then -EXTENSION="ubuntu-appindicator@ubuntu.com" -CONF_DIR=/etc/dconf/db/local.d -CONF_FILE=00-extensions + echo "To be implemented" -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 <> $PROF_DIR/$PROF_FILE + fi + + grep -q "system-db:local" $PROF_DIR/$PROF_FILE + if [ "$?" = "1" ] ; then + echo "system-db:local" >> $PROF_DIR/$PROF_FILE + fi + else + # + # Generate user file + # + mkdir -p $PROF_DIR + cat >$PROF_DIR/$PROF_FILE <$CONF_DIR/$CONF_FILE <