aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-05-26 09:09:07 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-05-26 09:09:07 +0000
commitecb14f4a5da62e9ea4b5020e25ccec37da669f59 (patch)
treeabe77484933d4994d4e3e8230c82e6f8ed82bf90
parent7c5c213621909f85a59ecf65ae6e654f4de560a1 (diff)
downloadupstream-ecb14f4a5da62e9ea4b5020e25ccec37da669f59.tar.gz
upstream-ecb14f4a5da62e9ea4b5020e25ccec37da669f59.tar.bz2
upstream-ecb14f4a5da62e9ea4b5020e25ccec37da669f59.zip
build: allow creating empty package feeds
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45757
-rw-r--r--package/Makefile4
-rwxr-xr-xscripts/ipkg-make-index.sh3
2 files changed, 5 insertions, 2 deletions
diff --git a/package/Makefile b/package/Makefile
index d5212f09a8..94b807f5d5 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -138,8 +138,8 @@ endif
$(curdir)/index: FORCE
@echo Generating package index...
@for d in $(PACKAGE_SUBDIRS); do ( \
- [ -d $(PACKAGE_DIR)/$$d ] && \
- cd $(PACKAGE_DIR)/$$d || continue; \
+ mkdir -p $(PACKAGE_DIR)/$$d; \
+ cd $(PACKAGE_DIR)/$$d || continue; \
$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \
gzip -9c Packages > Packages.gz; \
); done
diff --git a/scripts/ipkg-make-index.sh b/scripts/ipkg-make-index.sh
index a398559bd8..12d143a044 100755
--- a/scripts/ipkg-make-index.sh
+++ b/scripts/ipkg-make-index.sh
@@ -9,8 +9,10 @@ if [ -z $pkg_dir ] || [ ! -d $pkg_dir ]; then
fi
which md5sum >/dev/null 2>&1 || alias md5sum=md5
+empty=1
for pkg in `find $pkg_dir -name '*.ipk' | sort`; do
+ empty=
name="${pkg##*/}"
name="${name%%_*}"
[[ "$name" = "kernel" ]] && continue
@@ -28,3 +30,4 @@ SHA256sum: $sha256sum\\
Description:/"
echo ""
done
+[ -n "$empty" ] && echo