summaryrefslogtreecommitdiff
path: root/examples/hooks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-06-02 17:10:36 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:44 +0100
commit6bb915f3b4e57b3a8a9612a7dcd4ce03af55828e (patch)
tree1df2c77e15fa86bbc0acefdb8c64da251b13faf1 /examples/hooks
parent7393c4508d12aec7ce82f3dd2e3b4d993dd49910 (diff)
downloadlive-build-6bb915f3b4e57b3a8a9612a7dcd4ce03af55828e.zip
live-build-6bb915f3b4e57b3a8a9612a7dcd4ce03af55828e.tar.gz
Updating kpdf-nodrm hook to also work with KDE4.
Diffstat (limited to 'examples/hooks')
-rwxr-xr-xexamples/hooks/kde-no-pdf-drm.sh27
-rwxr-xr-xexamples/hooks/kpdf-nodrm.sh12
2 files changed, 27 insertions, 12 deletions
diff --git a/examples/hooks/kde-no-pdf-drm.sh b/examples/hooks/kde-no-pdf-drm.sh
new file mode 100755
index 0000000..2eb3739
--- /dev/null
+++ b/examples/hooks/kde-no-pdf-drm.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# This is a hook for live-helper(7) to configure KDEs PDF viewer to ignore
+# manipulation restrcition on "DRM protect" PDF documents.
+#
+# To enable it, copy or symlink this hook into your config/chroot_local-hooks
+# directory.
+
+if [ -d /usr/share/kde4/config ]
+then
+ # KDE4 (squeeze/sid)
+
+cat > /usr/share/kde4/config/okularpartrc << EOF
+[General]
+ObeyDRM=false
+EOF
+
+elif [ -d /usr/share/config ]
+then
+ # KDE3 (etch/lenny)
+
+cat > /usr/share/config/kpdfpartrc << EOF
+[General]
+ObeyDRM=false
+EOF
+
+fi
diff --git a/examples/hooks/kpdf-nodrm.sh b/examples/hooks/kpdf-nodrm.sh
deleted file mode 100755
index 02939b0..0000000
--- a/examples/hooks/kpdf-nodrm.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# This is a hook for live-helper(7) to configure kpdf to ignore manipulation
-# restrcition on "DRM protect" PDF documents.
-#
-# To enable it, copy or symlink this hook into your config/chroot_local-hooks
-# directory.
-
-cat > /etc/kde3/kpdfpartrc << EOF
-[General]
-ObeyDRM=false
-EOF