#!/bin/sh
set -e

LAB_DIRS='binary source udeb info changes'

# Try to purge the default lab if it looks like a lab.  If the user configured
# a lab for some other location, currently we don't do anything about that.
# Arguably we should parse lintianrc and remove that lab, but I'm not sure
# that's a good idea.
if [ "$1" = "purge" ]; then
    for DIR in $LAB_DIRS ; do
        rm -rf "/var/spool/lintian/$DIR"
    done
    [ ! -d /var/spool/lintian ] || rmdir --ignore-fail-on-non-empty /var/spool/lintian
fi

#DEBHELPER#
