summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/postinst-scrollkeeper3
-rw-r--r--autoscripts/postinst-usrlocal16
-rw-r--r--autoscripts/postrm-scrollkeeper3
-rw-r--r--autoscripts/prerm-usrlocal7
4 files changed, 29 insertions, 0 deletions
diff --git a/autoscripts/postinst-scrollkeeper b/autoscripts/postinst-scrollkeeper
new file mode 100644
index 00000000..5f2a255d
--- /dev/null
+++ b/autoscripts/postinst-scrollkeeper
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ]; then
+ scrollkeeper-update -q
+fi
diff --git a/autoscripts/postinst-usrlocal b/autoscripts/postinst-usrlocal
new file mode 100644
index 00000000..a2f004db
--- /dev/null
+++ b/autoscripts/postinst-usrlocal
@@ -0,0 +1,16 @@
+if [ "$1" = configure ]; then
+(
+ while read line; do
+ set -- $line
+ dir="$1"; mode="$2"; user="$3"; group="$4"
+ if [ ! -e "$dir" ]; then
+ if mkdir "$dir" 2>/dev/null; then
+ chown "$user":"$group" "$dir"
+ chmod "$mode" "$dir"
+ fi
+ fi
+ done
+) << DATA
+#DIRS#
+DATA
+fi
diff --git a/autoscripts/postrm-scrollkeeper b/autoscripts/postrm-scrollkeeper
new file mode 100644
index 00000000..209a6e14
--- /dev/null
+++ b/autoscripts/postrm-scrollkeeper
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ]; then
+ scrollkeeper-update -q
+fi
diff --git a/autoscripts/prerm-usrlocal b/autoscripts/prerm-usrlocal
new file mode 100644
index 00000000..baafc23e
--- /dev/null
+++ b/autoscripts/prerm-usrlocal
@@ -0,0 +1,7 @@
+(
+ while read dir; do
+ rmdir "$dir" 2>/dev/null || true
+ done
+) << DATA
+#JUSTDIRS#
+DATA