summarylogtreecommitdiffstats
path: root/install-actions.sh
diff options
context:
space:
mode:
authorVladimir Svyatski2019-05-07 01:38:44 +0300
committerVladimir Svyatski2019-05-07 01:45:54 +0300
commitdb40b455bb88759484aae0a4a971d75f1c49bbff (patch)
tree8fcbbe73daacd3df84d4d7f345cd04b190c3267d /install-actions.sh
downloadaur-db40b455bb88759484aae0a4a971d75f1c49bbff.tar.gz
Initial commit
Diffstat (limited to 'install-actions.sh')
-rw-r--r--install-actions.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/install-actions.sh b/install-actions.sh
new file mode 100644
index 000000000000..9a89c8aee941
--- /dev/null
+++ b/install-actions.sh
@@ -0,0 +1,21 @@
+post_install() {
+ cd /opt/kmeldb-ui
+
+ chmod 755 ./kenwooddbgen.sh
+
+ # creating __pycache__ folders and adding proper permissions so that Python can generate
+ # compiled bytecode running under standard user account
+ mkdir ./__pycache__
+ chmod 777 ./__pycache__
+ mkdir ./kmeldb_cli/kmeldb/__pycache__
+ chmod 777 ./kmeldb_cli/kmeldb/__pycache__
+
+ cd -
+}
+
+pre_remove() {
+ # Some files (generated by postinstall, for example) are left.
+ # We need to clean the mess.
+ [ -d /opt/kmeldb-ui/__pycache__ ] && rm -r /opt/kmeldb-ui/__pycache__
+ [ -d /opt/kmeldb-ui/kmeldb_cli/kmeldb/__pycache__ ] && rm -r /opt/kmeldb-ui/kmeldb_cli/kmeldb/__pycache__
+}