From 25c7a00c24a5c2f6a8f22c6ab18abbbda2ac9cc4 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Wed, 25 Jul 2018 11:46:32 +0300 Subject: [PATCH] Better filter for -ota envs --- code/build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/build.sh b/code/build.sh index 57b030f9..f00471f4 100755 --- a/code/build.sh +++ b/code/build.sh @@ -27,8 +27,12 @@ if [ ${par_thread} -ge ${par_total_threads} ]; then fi # Available environments -travis=$(grep env: platformio.ini | grep travis | sed 's/\[env://' | sed 's/\]/ /' | sort) -available=$(grep env: platformio.ini | grep -v ota | grep -v ssl | grep -v travis | sed 's/\[env://' | sed 's/\]/ /' | sort) +list_envs() { + grep env: platformio.ini | sed 's/\[env:\(.*\)\]/\1/g' +} + +travis=$(list_envs | grep travis | sort) +available=$(list_envs | grep -Ev -- '-ota$|-ssl$|^travis' | sort) # Build tools settings export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -DAPP_REVISION='\"$git_revision\"'"