tn3399_openwrt/scripts/check-toolchain-clean.sh
Petr Štetiar 9116096c0f check-toolchain-clean.sh: fix shellcheck warnings
Fixes following complaints and suggestions:

 In scripts/check-toolchain-clean.sh line 2:
 eval `grep CONFIG_GCC_VERSION .config`
      ^-- SC2046 (warning): Quote this to prevent word splitting.
      ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-02-28 15:17:11 +01:00

10 lines
382 B
Bash
Executable File

#!/bin/sh
eval "$(grep CONFIG_GCC_VERSION .config)"
CONFIG_TOOLCHAIN_BUILD_VER="$CONFIG_GCC_VERSION-$(cat toolchain/build_version)"
touch .toolchain_build_ver
[ "$CONFIG_TOOLCHAIN_BUILD_VER" = "$(cat .toolchain_build_ver)" ] && exit 0
echo "Toolchain build version changed, running make targetclean"
make targetclean
echo "$CONFIG_TOOLCHAIN_BUILD_VER" > .toolchain_build_ver
exit 0