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

Add "-xargs" to pass params to executed binary #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GWRon
Copy link
Contributor

@GWRon GWRon commented Apr 17, 2023

usage example:

./bmk makeapp -r -w -l linux -g x64 -t console -x -xargs "-v -bla 2 -dir \"c:\dir with space\subdir\"" -o /home/user/tests/test_args /home/user/tests/test_args.bmx

usage example:
./bmk makeapp -r -w -l linux -g x64 -t console -x -xargs "-v -bla 2 -dir \"c:\dir with space\subdir\"" -o /home/user/tests/test_args /home/user/tests/test_args.bmx
@GWRon
Copy link
Contributor Author

GWRon commented Apr 17, 2023

test_args.bmx:

SuperStrict
Framework Brl.StandardIO

print "args: " + AppArgs.length
For local i:int = 0 until AppArgs.length
	print i+": " + AppArgs[i]
Next
$ ./bmk2 makeapp -r -w -l linux -g x64 -t console -x -xargsmerge -xargs "-v -bla 2 -bla 3 \"c:\dir with space\subdir\"" -o /home/ronny/Arbeit/Projekte/TVTower/Current/tests/test_args /home/ronny/Arbeit/Projekte/TVTower/Current/tests/test_args.bmx
Executing:test_args
args: 7
0: /home/ronny/Arbeit/Projekte/TVTower/Current/tests/test_args
1: -v
2: -bla
3: 2
4: -bla
5: 3
6: c:\dir with space\subdir

When passing "-xargsnomerge" then the first arg (the binary name) won't be prepended.

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.

1 participant