summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
17cf18c)
This adds checks for directories, non-regular files, non-readable files
and files that do not look like equivs files.
cd $PACKAGES
for i in ../../$SOURCES/*; do
cd $PACKAGES
for i in ../../$SOURCES/*; do
+ BASE=`basename "$i"`
+ if [ -d "$i" ]; then
+ echo "Skipping directory '$BASE'"
+ continue;
+ fi
+ if [ ! -f "$i" ]; then
+ echo "Skipping special file file '$BASE'"
+ continue;
+ fi
+ if [ ! -r "$i" ]; then
+ echo "Skipping non-readable file '$BASE'"
+ continue;
+ fi
+
VERSION=`cat $i | grep "^Version:" | sed "s/^Version: //"`
PACKAGE=`cat $i | grep "^Package:" | sed "s/^Package: //"`
VERSION=`cat $i | grep "^Version:" | sed "s/^Version: //"`
PACKAGE=`cat $i | grep "^Package:" | sed "s/^Package: //"`
-
- if [ ! -f "${PACKAGE}_${VERSION}_all.deb" ]; then
- echo "Building version $VERSION of $PACKAGE"
- equivs-build $i
- else
+
+ if [ -z "${PACKAGE}" -o -z "${VERSION}" ]; then
+ echo "Skipping non-equivs file '$BASE'"
+ continue;
+ fi
+ if [ -f "${PACKAGE}_${VERSION}_all.deb" ]; then
echo "Skipping $PACKAGE, version $VERSION already built"
echo "Skipping $PACKAGE, version $VERSION already built"
+
+ echo "Building version $VERSION of $PACKAGE"
+ equivs-build $i