1
0
Fork 0
dokuwiki-plugins-extra/debian/dokuwiki-plugins-extra.prerm
Daniel Baumann 2fca362a9f
Adding debian version 20241201-1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-03-16 08:08:14 +01:00

34 lines
603 B
Bash
Executable file

#!/bin/sh
set -e
case "${1}" in
remove|upgrade|deconfigure)
DIRECTORIES="$(cd /usr/share/dokuwiki/plugins-extra && ls -d */ | sed -e 's|/$||g')"
# Removing 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
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`${1}'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0