- # Configure this package. If the package must prompt the user for
- # information, do it here.
-
- mkdir -p /var/lib/citadel/www/static
- # Activate menu-methods script
- #: chmod a+x /etc/menu-methods/foo
-
- # Update ld.so cache
- #: ldconfig
-
- # Make our version of a program available
- #: update-alternatives \
- #: --install /usr/bin/program program /usr/bin/alternative 50 \
- #: --slave /usr/share/man/man1/program.1.gz program.1.gz \
- #: /usr/share/man/man1/alternative.1.gz
-
- # Tell ucf that the file in /usr/share/foo is the latest
- # maintainer version, and let it handle how to manage the real
- # confuguration file in /etc. This is how a static configuration
- # file can be handled:
- rm -f /tmp/md5sums
- touch /tmp/md5sums
- cd /var/lib/citadel/www/;
- for i in `find -type f `; do
- md5sum "$i" >>/tmp/md5sums
- done
-
- cd /usr/share/doc/citadel-webcit/examples/
- # if target dirs don't exist, create them.
- for i in `find -type d` ; do
- if test ! -d /var/lib/citadel/www/$i; then
- mkdir -p /var/lib/citadel/www/$i
- fi
- done
-
- gunzip -c md5sums > /tmp/newsums
- if diff /tmp/newsums /tmp/md5sums >/dev/null; then
- echo ''>/dev/null
- else
- cd /usr/share/doc/citadel-webcit/examples/
- for i in `cat /tmp/newsums |sed "s;.* \./;;"`; do
- if test -f $i.gz; then
- j=`basename $i|sed -e "s;.gz;;" `
- gunzip -c "/usr/share/doc/citadel-webcit/examples$REL_PATH/$i" >"/tmp/$j"
- i=`dirname $i`/$j
- else
- j=`basename $i`
- cp "/usr/share/doc/citadel-webcit/examples/$i" "/tmp"
- fi
- if test -f /var/lib/citadel/www/$i; then
- origsum=`grep "$i" /tmp/md5sums |sed "s; .*;;"`
- newsum=`grep "$i" /tmp/newsums |sed "s; .*;;"`
- if test -z "$origsum"; then
- ucf "/tmp/$j" "/var/lib/citadel/www/$i"
- else
- if test "$origsum" != "$newsum"; then
- ucf "/tmp/$j" "/var/lib/citadel/www/$i"
- fi
- fi
- else
- ucf "/tmp/$j" "/var/lib/citadel/www/$i"
- fi
- rm -f "/tmp/$j"
- done
- fi
- rm -f /tmp/newsums /tmp/md5sums