Make source cleanup script not die on first unknown directory

Instead, collect all unknown directories and report them at the end.
This commit is contained in:
Benjamin Otte 2011-04-19 20:21:07 +02:00
parent 4a3578d200
commit 3c74284f80

View File

@ -121,6 +121,7 @@ rm -rf $DIRECTORY
tar xjf $SOURCE || error "Cannot unpack $SOURCE"
pushd $DIRECTORY > /dev/null || error "Cannot open directory \"$DIRECTORY\""
unknown=""
for subdir in gst ext sys; do
for dir in $subdir/* ; do
# Don't touch non-directories
@ -152,11 +153,19 @@ for subdir in gst ext sys; do
continue;
elif ! ( check_allowed $MODULE ) ; then
echo "Unknown module in $dir"
exit 1
unknown="$unknown $dir"
fi
done
done
echo
if test "x$unknown" != "x"; then
echo -n "Aborting due to unkown modules: "
echo "$unknown" | sed "s/ /\n /g"
exit 1
fi
autoreconf
popd > /dev/null