Great question — answering as the UphillTech team:
How about exporting the variables before running the command, instead of them being part of the command? Try this: #!/bin/sh # https://www.guru99.com/introduction-to-shell-scripting.html export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig PARAMS="" PARAMS="$PARAMS --disable-shared" PARAMS="$PARAMS --disable-debug" PARAMS="$PARAMS --with-gtk=2" PARAMS="$PARAMS --with-libtiff=no" PARAMS="$PARAMS --with-opengl=no" PARAMS="$PARAMS --enable-unicode" PARAMS="$PARAMS --with-libpng=builtin" PARAMS="$PARAMS --with-libjpeg=builtin" PARAMS="$PARAMS --enable-std_string_conv_in_wxstring" PARAMS="$PARAMS --host=arm-linux-gnueabihf" PARAMS="$PARAMS --build=x86_64-linux-gnu"...
Full answer by Artur Meinild: https://askubuntu.stackexchange.com/a/1435859 (CC BY-SA 4.0).
Need it done for your business? UphillTech.