Skip to content

Improve build.sh #1641

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Improve build.sh #1641

wants to merge 5 commits into from

Conversation

felipecrs
Copy link
Contributor

@felipecrs felipecrs commented Mar 10, 2025

Fixes check_command

Code_6aS094ndN0.mp4

Fixes errors being ignored

I found that amd64 build is currently failing because of:

+ go build -ldflags -s -w -trimpath -o go2rtc_linux_amd64
package github.com/AlexxIT/go2rtc
        imports github.com/AlexxIT/go2rtc/internal/v4l2
        imports github.com/AlexxIT/go2rtc/pkg/v4l2/device: C source files not allowed when not using cgo or SWIG: videodev2_arch.c

Which was being ignored previously and then this architecture would not be built.

Display commands being executed

With set -x so that it's easier to follow the script's progress.

@felipecrs felipecrs changed the title Fix check_command in build.sh Improve build.sh Mar 10, 2025
@felipecrs
Copy link
Contributor Author

@AlexxIT I would also suggest removing build.cmd as you can run build.sh on Windows using Git Bash.

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 11, 2025

I can't run it from GoLand console. I think other Windows users won't be able to handle the shell file either.

.\scripts\build.sh
Program 'build.sh' failed to run: No application is associated with the specified file for this operationAt line:1 char:1

@skrashevich what do you this about this changes? I'm not a big expert on shell files.

@skrashevich
Copy link
Contributor

Good changes. There are no issues with the script on *nix systems. On Windows, it must be run through Bash

@felipecrs
Copy link
Contributor Author

felipecrs commented Mar 11, 2025

@AlexxIT can you try bash .\scripts\build.sh?

Otherwise maybe you don't have Git Bash installed (it comes with Git for Windows).

But anyway, I am not deleting the cmd script.

@AlexxIT AlexxIT self-assigned this Mar 11, 2025
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

Successfully merging this pull request may close these issues.

3 participants