Adding debian version 20241201-1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
f8d74cc725
commit
2fca362a9f
11 changed files with 310 additions and 0 deletions
65
debian/dokuwiki-plugins-extra.postinst
vendored
Executable file
65
debian/dokuwiki-plugins-extra.postinst
vendored
Executable file
|
@ -0,0 +1,65 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
case "${1}" in
|
||||
configure)
|
||||
db_get dokuwiki-plugins/plugins
|
||||
PLUGINS="${RET:-none}"
|
||||
|
||||
db_stop
|
||||
|
||||
# Handling plugins
|
||||
DIRECTORIES="$(cd /usr/share/dokuwiki/plugins-extra && ls -d */ | sed -e 's|/$||g')"
|
||||
|
||||
case "${PLUGINS}" in
|
||||
all)
|
||||
PLUGINS="${DIRECTORIES}"
|
||||
;;
|
||||
|
||||
none)
|
||||
PLUGINS=""
|
||||
;;
|
||||
|
||||
*)
|
||||
PLUGINS="$(echo ${PLUGINS} | sed -e 's|,| |g')"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Disabling all plugins
|
||||
for PLUGIN in ${DIRECTORIES}
|
||||
do
|
||||
if [ -L "/var/lib/dokuwiki/lib/plugins/${PLUGIN}" ]
|
||||
then
|
||||
if [ "$(dirname $(readlink /var/lib/dokuwiki/lib/plugins/"${PLUGIN}"))" = "/usr/share/dokuwiki/plugins-extra" ]
|
||||
then
|
||||
rm -f "/var/lib/dokuwiki/lib/plugins/${PLUGIN}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Enabling selected plugins
|
||||
for PLUGIN in ${PLUGINS}
|
||||
do
|
||||
if [ -e "/usr/share/dokuwiki/plugins-extra/${PLUGIN}" ]
|
||||
then
|
||||
ln -s "/usr/share/dokuwiki/plugins-extra/${PLUGIN}" "/var/lib/dokuwiki/lib/plugins/${PLUGIN}"
|
||||
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