Skip to content

A tool to manage a project's build and run commands

License

Notifications You must be signed in to change notification settings

TheOnlyMrCat/runscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Runscript

Runscript is a tool like make (or, perhaps, just) which manages project-specific commands. When you want to run your program, simply type run.

For an example of a useful runscript, see the runfile for this repository.

Features

  • Does not use Makefile syntax
  • Supports most of the shell features you know and love (parsing adapted from ipetkov/conch_parser)
  • Multiple 'phases' per target, so you can chose to build, run, or test a target. If those options aren't enough, you can name your phases whatever you want!
  • Fancy output while running scripts
  • Properly emulates a shell, with exportable variables, sourceing shell scripts, cding.
  • If runscript's builtin shell doesn't have everything you need, you can execute a script with an external shell (e.g. bash). You can also apply this to an entire runscript.

Still to do

  • A number of more advanced shell features, including:
    • A few shell builtin commands (e.g. exit, nohup)
    • Local variables (?)
    • Arithmetic and a number of parameter substitutions
    • Here-documents
  • Replace manual SIGHUP'ing with setpgid
  • Fix race conditions in output
  • Remove most sources of panicking (fuzz testing?)
  • Support Windows properly

Non-goals

Despite having -c and -s options for executing single commands and shell scripts, respectively, Runscript won't emulate a POSIX shell perfectly. I'll try to make it useful enough for most use cases, but if you want a POSIX shell, just use a POSIX shell. That being said, feel free to test the limitations of those two flags! I do have to be able to execute shell scripts to implement the source builtin.

How to install

Binaries are available from the releases page. Supporting package managers is difficult, so I'm not going to try doing it until this gets real use. (Feel free to open an issue about it)

License

Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0).

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.