From: fennecdjay Date: Tue, 28 Feb 2023 12:06:06 +0000 (+0100) Subject: :bug: embed script X-Git-Tag: nightly~187 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3b7f7b629bc7b290b83745a5f5b0065afbf084b0;p=gwion.git :bug: embed script --- diff --git a/scripts/embed.bash b/scripts/embed.bash index c5ce77f1..915167da 100644 --- a/scripts/embed.bash +++ b/scripts/embed.bash @@ -168,15 +168,16 @@ samplerate=$(jq -rc '.samplerate' <<< "$audio") args=$(jq -rc '.args' <<< "$json") -array_is_ok "$args" && { +{ count=0 config "CFLAGS += -DGWION_CONFIG_ARGS" echo "static const char *config_argv[] = {" - jq -rc '.[]' <<< "$args" | - while read -r arg - do - echo " \"$arg\", " - done + array_is_ok "$args" && { + jq -rc '.[]' <<< "$args" | + while read -r arg + do echo " \"$arg\", " + done + } echo "};" count=$((count+1)) echo "static const int config_argc = $count;"