summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--notion-enhancer10
-rw-r--r--reapply-notion-enhancer.hook2
2 files changed, 6 insertions, 6 deletions
diff --git a/notion-enhancer b/notion-enhancer
index 10169e8062f5..1efba70b3925 100644
--- a/notion-enhancer
+++ b/notion-enhancer
@@ -10,10 +10,9 @@ yellow="${bold}$(tput setaf 3)"
post_install() {
echo "Applying notion-enhancer automatically..."
- notion-enhancer apply -y
- warn "The installer will own the files necessary for it to work with chmod -R a+wr"
- chmod -R a+wr /usr/lib/node_modules/notion-enhancer/ /opt/notion-app/
- chmod a+wr /usr/share/applications/notion-app.desktop /usr/bin/notion-app
+ warn "The installer will own the files necessary for it to work with chmod -R a+wr. Ignore the warnings if any"
+ chmod -R a+wr /usr/lib/node_modules/notion-enhancer/ /opt/notion-app/ /usr/share/applications/notion-app.desktop /usr/bin/notion-app
+ notion-enhancer apply -y
}
post_upgrade() {
@@ -21,7 +20,8 @@ post_upgrade() {
echo "Notion-enhancer is not applied, skipping"
else
echo "Reapplying notion-enhancer"
- notion-enhancer apply -y
+ notion-enhancer remove -n # don't delete the data
+ notion-enhancer apply -y # yes, overwrite
fi
}
diff --git a/reapply-notion-enhancer.hook b/reapply-notion-enhancer.hook
index b91dde78b3f4..456eb2f9d42e 100644
--- a/reapply-notion-enhancer.hook
+++ b/reapply-notion-enhancer.hook
@@ -5,6 +5,6 @@ Target = notion-app
[Action]
Description = Reapplying notion-enhancer...
When = PostTransaction
-Exec = /usr/bin/notion-enhancer apply -n
+Exec = /bin/sh -c 'chmod -R a+wr /usr/lib/node_modules/notion-enhancer/ /opt/notion-app/ /usr/share/applications/notion-app.desktop /usr/bin/notion-app && /usr/bin/notion-enhancer remove -n && /usr/bin/notion-enhancer apply -n'
Depends = notion-enhancer
Depends = notion-app