Multi-command scripts
See original GitHub issueI’ve been trying out the script runner. I have what’s probably a common setup, where I convert md files to html, and then want to run other scripts to create other parts of the site. So the script looks something like:
mkdir newdir
cd newdir/
deno run xxx
I put this in a separate .sh
file, which works fine. But I would prefer to include this in the Lume config file, and I can’t find a way to do this. If I put the cmds in one line separated by ;
, then it makes dirs called newdir;
, cd
, etc. The same with separating the cmds with &&
. I also tried using the sequential option, but it looks like it tries to cd
before mkdir
has completed, so that doesn’t work either.
Any ideas?
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (24 by maintainers)
Top Results From Across the Web
Template for Multi Command Bash Scripts
Template for Multi Command Bash Scripts. ... It handles the case where one script may perform multiple commands, and that must be determined...
Read more >Creating A Simple Bash Script With Multiple Commands
I'm trying to create a script that will open gnome-terminal, list the contents of /examplefolder, and then be ready for regular terminal usage....
Read more >Run multiple commands in one line with `;`, `&&` and `||`
There are 3 ways to run multiple shell commands in one line: 1) Use ;. No matter the first command cmd1 run successfully...
Read more >Multiple commands syntax (sed, a stream editor)
There are several methods to specify multiple commands in a sed program. Using newlines is most natural when running a sed script from...
Read more >Shell scripting step by step tutorial
Learn how to make your first shell script step by step, write shell scripts, write if statements, perform math operations, compare strings, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yes, that all seems to work now, thanks. I’d suggest adding some docs/examples on how to use flags.
site.flags
seems to always exist, so I can just doprocess(site.flags[0])
and it will just use ‘undefined’ if there are no flags (which is what I want).yeah, that would make it very versatile. Especially if I could have
myFunction(params)
andlume --run my-script <params>
would pass the params through. 😃