wasmCloud/examples

add shell test to example makefiles

Closed this issue · 1 comments

when run under windows powershell, the example makefiles fail with multi-line commands that use \ for line continuation, but the error given isn't helpful for the user to diagnose. We should build a check into the makefile to test the shell capabilities and display an informative error.
Something like the following (pseudocode) should be added to build/makefiles/*.mk:

if $SHELL != "bash" && $SHELL != "zsh" && $SHELL != "fsh" ; then
    if ! $(multi \
        line \
        command ); then
        echo "this makefile expect a bash-compatible shell. Please start `bash`, `zsh`, or a similar shell before running make commands"
        exit
     fi
fi

the first if only runs the test if the shell isn't a common shell type.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this has been closed too eagerly, please feel free to tag a maintainer so we can keep working on the issue. Thank you for contributing to wasmCloud!