#!/bin/bash FILELIST=${1} PORTDIR="/usr/local/share/gentoo-x86" FILESDIR="files" usage() { echo "Usage: ${0##*/} filelist" echo " Checks for non-digest files in FILESDIR subdirectories of all" echo " directory trees listed in the filelist input file." echo " Files from filelist are themselves subdirectories of PORTDIR." echo " In other words, put category/package in filelist." exit 1 } if [[ $# -ne 1 ]]; then usage fi echo "Searching for non-digest files in ${FILESDIR}/ ..." for PKG in $(< ${FILELIST}); do pushd ${PORTDIR}/${PKG} &> /dev/null FILES=$(ls files/ | grep -v -e '^digest' -e '^CVS$') if [[ -n "${FILES}" ]]; then echo "${PKG}:" for FILE in ${FILES}; do echo " ${FILE}" done fi popd &> /dev/null done