mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
buildsystem: remove grep from PKG_ARCH check
More efficient, slightly more functional. Can be a space delimited list of architectures. Architectures to be excluded can be specified with !ARCH. Allows "any !arm" to be interpreted as "any arch, but not arm". Blank/undefined is equivalent to "any".
This commit is contained in:
parent
430f6e33a0
commit
e0b833c782
@ -44,9 +44,9 @@ else
|
||||
fi
|
||||
[ -z "$TARGET" ] && TARGET="target"
|
||||
|
||||
if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then
|
||||
echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0
|
||||
echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0
|
||||
if [ -n "$PKG_ARCH" ]; then
|
||||
listcontains "$PKG_ARCH" "!$TARGET_ARCH" && exit 0
|
||||
listcontains "$PKG_ARCH" "$TARGET_ARCH" || listcontains "$PKG_ARCH" "any" || exit 0
|
||||
fi
|
||||
|
||||
unset INSTALL
|
||||
|
@ -25,9 +25,9 @@ if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then
|
||||
echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0
|
||||
echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0
|
||||
if [ -n "$PKG_ARCH" ]; then
|
||||
listcontains "$PKG_ARCH" "!$TARGET_ARCH" && exit 0
|
||||
listcontains "$PKG_ARCH" "$TARGET_ARCH" || listcontains "$PKG_ARCH" "any" || exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$PKG_ADDON_PROJECTS" -a ! "$PKG_ADDON_PROJECTS" = "any" ]; then
|
||||
|
@ -46,9 +46,9 @@ mkdir -p $STAMPS_INSTALL/$PACKAGE_NAME
|
||||
|
||||
[ -f $STAMP ] && exit 0
|
||||
|
||||
if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then
|
||||
echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0
|
||||
echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0
|
||||
if [ -n "$PKG_ARCH" ]; then
|
||||
listcontains "$PKG_ARCH" "!$TARGET_ARCH" && exit 0
|
||||
listcontains "$PKG_ARCH" "$TARGET_ARCH" || listcontains "$PKG_ARCH" "any" || exit 0
|
||||
fi
|
||||
|
||||
if [ ! -f $PKG_DIR/package.mk ]; then
|
||||
|
@ -34,9 +34,9 @@ else
|
||||
fi
|
||||
[ -z "$TARGET" ] && TARGET="target"
|
||||
|
||||
if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then
|
||||
echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0
|
||||
echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0
|
||||
if [ -n "$PKG_ARCH" ]; then
|
||||
listcontains "$PKG_ARCH" "!$TARGET_ARCH" && exit 0
|
||||
listcontains "$PKG_ARCH" "$TARGET_ARCH" || listcontains "$PKG_ARCH" "any" || exit 0
|
||||
fi
|
||||
|
||||
STAMP=$STAMPS/$PACKAGE_NAME/build_$TARGET
|
||||
|
Loading…
x
Reference in New Issue
Block a user