#! /bin/sh lliurex-live remove-lists || true BASE_DIR="/usr/share/lliurex/lliurex-live-builder" for d in binary-hooks chroot-hooks bootstrap-copy ; do for l in lliurex-live-desktop-extended lliurex-live-desktop ; do if [ -d "${BASE_DIR}/${d}.${l}" ] ; then DIR_LIST="$(cd ${BASE_DIR}/${d}; find ./ -mindepth 1 -xtype d |sort -r)" FILE_LIST="$(cd ${BASE_DIR}/${d}; find ./ -mindepth 1 -xtype f)" for f in ${FILE_LIST}; do rm -f "${BASE_DIR}/${d}.${l}/$f" done for f in ${DIR_LIST}; do rmdir --ignore-fail-on-non-empty "${BASE_DIR}/${d}.${l}/$f" || true done fi done done #DEBHELPER#