Adding debian version 20241201-1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
485e3244ed
commit
9c8ce610a0
11 changed files with 250 additions and 0 deletions
65
debian/dokuwiki-templates-extra.postinst
vendored
Executable file
65
debian/dokuwiki-templates-extra.postinst
vendored
Executable file
|
@ -0,0 +1,65 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
case "${1}" in
|
||||
configure)
|
||||
db_get dokuwiki-templates/templates
|
||||
TEMPLATES="${RET:-none}"
|
||||
|
||||
db_stop
|
||||
|
||||
# Handling templates
|
||||
DIRECTORIES="$(cd /usr/share/dokuwiki/templates-extra && ls -d */ | sed -e 's|/$||g')"
|
||||
|
||||
case "${TEMPLATES}" in
|
||||
all)
|
||||
TEMPLATES="${DIRECTORIES}"
|
||||
;;
|
||||
|
||||
none)
|
||||
TEMPLATES=""
|
||||
;;
|
||||
|
||||
*)
|
||||
TEMPLATES="$(echo ${TEMPLATES} | sed -e 's|,| |g')"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Disabling all templates
|
||||
for TEMPLATE in ${DIRECTORIES}
|
||||
do
|
||||
if [ -L "/var/lib/dokuwiki/lib/tpl/${TEMPLATE}" ]
|
||||
then
|
||||
if [ "$(dirname $(readlink /var/lib/dokuwiki/lib/tpl/"${TEMPLATE}"))" = "/usr/share/dokuwiki/templates-extra" ]
|
||||
then
|
||||
rm -f "/var/lib/dokuwiki/lib/tpl/${TEMPLATE}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Enabling selected templates
|
||||
for TEMPLATE in ${TEMPLATES}
|
||||
do
|
||||
if [ -e "/usr/share/dokuwiki/templates-extra/${TEMPLATE}" ]
|
||||
then
|
||||
ln -s "/usr/share/dokuwiki/templates-extra/${TEMPLATE}" "/var/lib/dokuwiki/lib/tpl/${TEMPLATE}"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`${1}'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue