Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

allow "acbuild script" read from stdin #273

Open
dimas opened this issue Nov 29, 2016 · 1 comment
Open

allow "acbuild script" read from stdin #273

dimas opened this issue Nov 29, 2016 · 1 comment

Comments

@dimas
Copy link

dimas commented Nov 29, 2016

I believe it is a convention that tools that accept file names can be given "-" to indicate stdin so "cat -" is the same as just "cat" (because for cat, stdin is the default source) but the fact is you can specify it explicitly.

Right now "acbuild script -" complains that it cannot find file "-".

Supporting stdin would allow use here-doc / here-text notations and embed ACB scripts into shell scripts

acbuild --debug script - <<END_TEXT

copy $SRC /temp
run -- bash /temp/something.sh
run -- rm -rf /temp

END_TEXT
@koflerdavid
Copy link

Reading from /dev/stdin worked for me. Of course, having a flag would be nicer.

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

No branches or pull requests

2 participants