Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated cross-compile build.sh script has syntax error when there are no dependencies #1277

Open
georgeslabreche opened this issue Jul 30, 2021 · 2 comments

Comments

@georgeslabreche
Copy link

I observed this when generating the build.sh script for a Raspberry Pi cross compilation:

image

$ ./build.sh 
./build.sh: line 107: syntax error near unexpected token `fi'
./build.sh: line 107: `fi'

My workaround is to just comment out those lines.

@bluca
Copy link
Member

bluca commented Jul 30, 2021

can you send a PR to fix it?

@stephan57160
Copy link
Contributor

Well... Things look not so easy.

Usually, one would use INCREMENTAL=0 as default value.
But, here, it's used when the flag -incremental is used:

        -i|--incremental)
        INCREMENTAL=0

and the same for UPDATE;

        -u|--update)
        UPDATE=0

Later, it seems that we want to check both with value INCREMENTAL != 0:

if [ $INCREMENTAL ] && [ $UPDATE ]; then
    echo Error: Incremental and update are exclusiv!
    exit -1
fi

Later, again, it seems that we fall back to a test of value 0:

if [ ! $INCREMENTAL ]; then
    # Clone and build dependencies

Not sure, but a few tests like this look buggy.
Maybe, @sappo should have a deeper look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants