question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-command scripts

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
probinscommented, Dec 2, 2020

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 do process(site.flags[0]) and it will just use ‘undefined’ if there are no flags (which is what I want).

1reaction
probinscommented, Nov 29, 2020

yeah, that would make it very versatile. Especially if I could have myFunction(params) and lume --run my-script <params> would pass the params through. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found