]> Nishi Git Mirror - gwion.git/commitdiff
:bug: embed script
authorfennecdjay <fennecdjay@gmail.com>
Tue, 28 Feb 2023 12:06:06 +0000 (13:06 +0100)
committerfennecdjay <fennecdjay@gmail.com>
Tue, 28 Feb 2023 12:06:06 +0000 (13:06 +0100)
scripts/embed.bash

index c5ce77f13892e4d1138934b293b16f921e8ef9ef..915167da097ea0bca7a675504a0399842ab3905a 100644 (file)
@@ -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;"