aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2023-01-30 18:37:39 +0100
committerPaul Spooren <mail@aparcar.org>2023-02-03 21:22:49 +0100
commit21242451c265f3b2fb47e710a5fabc74dc59efce (patch)
tree52a394cc152eae95331c45346176209c4cc29fd1
parentf56d5932d24f9d2d339088011ffaa5c3e8340e0f (diff)
downloadupstream-21242451c265f3b2fb47e710a5fabc74dc59efce.tar.gz
upstream-21242451c265f3b2fb47e710a5fabc74dc59efce.tar.bz2
upstream-21242451c265f3b2fb47e710a5fabc74dc59efce.zip
scripts: size_compare: fix support for CONFIG_BINARY_FOLDER
There is no CONFIG_BINARY_DIR, it's CONFIG_BINARY_FOLDER. While at it, don't parse the shell compatible .config, eval it. Signed-off-by: Andre Heider <a.heider@gmail.com>
-rwxr-xr-xscripts/size_compare.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/scripts/size_compare.sh b/scripts/size_compare.sh
index a5cc3337c7..617004e72b 100755
--- a/scripts/size_compare.sh
+++ b/scripts/size_compare.sh
@@ -21,17 +21,20 @@
### -p --package-size Check IPK package size and not installed size
### -h --help This message
-CONFIG_TARGET=$(sed -n 's/^CONFIG_TARGET_BOARD="\(.*\)"$/\1/p' .config)
-CONFIG_SUBTARGET=$(sed -n 's/^CONFIG_TARGET_SUBTARGET="\(.*\)"$/\1/p' .config)
-CONFIG_ARCH=$(sed -n 's/^CONFIG_TARGET_ARCH_PACKAGES="\(.*\)"$/\1/p' .config)
+eval "$(grep \
+ -e ^CONFIG_TARGET_BOARD= \
+ -e ^CONFIG_TARGET_SUBTARGET= \
+ -e ^CONFIG_TARGET_ARCH_PACKAGES= \
+ -e ^CONFIG_BINARY_FOLDER= \
+ .config 2>/dev/null \
+)"
CONFIG_PACKAGES=$(sed -n 's/^CONFIG_PACKAGE_\(.*\)=y$/\1/p' .config | tr '\n' ' ')
-CONFIG_BIN_DIR=$(sed -n 's/^CONFIG_BINARY_DIR="\(.*\)"$/\1/p' .config)
-TARGET=${TARGET:-$CONFIG_TARGET}
-SUBTARGET=${SUBTARGET:-$CONFIG_SUBTARGET}
-ARCH=${ARCH:-$CONFIG_ARCH}
+TARGET=${TARGET:-$CONFIG_TARGET_BOARD}
+SUBTARGET=${SUBTARGET:-$CONFIG_TARGET_SUBTARGET}
+ARCH=${ARCH:-$CONFIG_TARGET_ARCH_PACKAGES}
PACKAGES=${PACKAGES:-$CONFIG_PACKAGES}
-BIN_DIR=${CONFIG_BIN_DIR:-./bin}
+BIN_DIR=${CONFIG_BINARY_FOLDER:-./bin}
BASE_URL="${BASE_URL:-https://downloads.openwrt.org/snapshots}"
CHECK_INSTALLED="${CHECK_INSTALLED:-y}"