X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/67f09fa245578c136ac34804dad41f1e1d694e48..12bb9fe75fd32a498b2a9e58a86ed9365c0f4bca:/target/imagebuilder/files/opkg-generate-config.sh diff --git a/target/imagebuilder/files/opkg-generate-config.sh b/target/imagebuilder/files/opkg-generate-config.sh index a385d9fa9..b2047a0d4 100755 --- a/target/imagebuilder/files/opkg-generate-config.sh +++ b/target/imagebuilder/files/opkg-generate-config.sh @@ -12,7 +12,8 @@ TARGETDIR="${1}" PKGARCH= for pkg in $TOPDIR/packages/*.ipk; do if [ -f "$pkg" ]; then - PKGARCH="${pkg##*_}" + PKGARCH="${pkg##*/}" + PKGARCH="${PKGARCH#*_*_}" PKGARCH="${PKGARCH%.ipk}" [ "$PKGARCH" = all ] || break fi @@ -31,7 +32,7 @@ rm -f $TOPDIR/tmp/opkg.conf [ -f $TOPDIR/repositories.conf ] && \ $TOPDIR/staging_dir/host/bin/sed \ - -n -e "s/\$A/$PKGARCH/g" -e "/^[[:space:]*]src/p" \ + -n -e "s/\$A/$PKGARCH/g" -e "/^[[:space:]]*src/p" \ $TOPDIR/repositories.conf > $TOPDIR/tmp/opkg.conf cat <> $TOPDIR/tmp/opkg.conf