Просмотр исходного кода

fix arch detection pattern to cope with underscores in board name, e.g. "adm5120_mips"

SVN-Revision: 22980
Jo-Philipp Wich 15 лет назад
Родитель
Сommit
7a2ce99fe5
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      target/imagebuilder/files/opkg-generate-config.sh

+ 2 - 1
target/imagebuilder/files/opkg-generate-config.sh

@@ -12,7 +12,8 @@ TARGETDIR="${1}"
 PKGARCH=
 PKGARCH=
 for pkg in $TOPDIR/packages/*.ipk; do
 for pkg in $TOPDIR/packages/*.ipk; do
 	if [ -f "$pkg" ]; then
 	if [ -f "$pkg" ]; then
-		PKGARCH="${pkg##*_}"
+		PKGARCH="${pkg##*/}"
+		PKGARCH="${PKGARCH#*_*_}"
 		PKGARCH="${PKGARCH%.ipk}"
 		PKGARCH="${PKGARCH%.ipk}"
 		[ "$PKGARCH" = all ] || break
 		[ "$PKGARCH" = all ] || break
 	fi
 	fi