build: allow creating empty package feeds

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45757
This commit is contained in:
Felix Fietkau 2015-05-26 09:09:07 +00:00
parent 7c5c213621
commit ecb14f4a5d
2 changed files with 5 additions and 2 deletions

View file

@ -138,7 +138,7 @@ endif
$(curdir)/index: FORCE $(curdir)/index: FORCE
@echo Generating package index... @echo Generating package index...
@for d in $(PACKAGE_SUBDIRS); do ( \ @for d in $(PACKAGE_SUBDIRS); do ( \
[ -d $(PACKAGE_DIR)/$$d ] && \ mkdir -p $(PACKAGE_DIR)/$$d; \
cd $(PACKAGE_DIR)/$$d || continue; \ cd $(PACKAGE_DIR)/$$d || continue; \
$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \ $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \
gzip -9c Packages > Packages.gz; \ gzip -9c Packages > Packages.gz; \

View file

@ -9,8 +9,10 @@ if [ -z $pkg_dir ] || [ ! -d $pkg_dir ]; then
fi fi
which md5sum >/dev/null 2>&1 || alias md5sum=md5 which md5sum >/dev/null 2>&1 || alias md5sum=md5
empty=1
for pkg in `find $pkg_dir -name '*.ipk' | sort`; do for pkg in `find $pkg_dir -name '*.ipk' | sort`; do
empty=
name="${pkg##*/}" name="${pkg##*/}"
name="${name%%_*}" name="${name%%_*}"
[[ "$name" = "kernel" ]] && continue [[ "$name" = "kernel" ]] && continue
@ -28,3 +30,4 @@ SHA256sum: $sha256sum\\
Description:/" Description:/"
echo "" echo ""
done done
[ -n "$empty" ] && echo