├── IDEAS.md ├── LICENSE ├── Makefile ├── README.md ├── phases.sh └── test_script.sh /IDEAS.md: -------------------------------------------------------------------------------- 1 | # Features 2 | * [ ] ineractive mode: ask before proceeding to the next phase 3 | * [ ] syntax checker 4 | * [ ] subphases can be implemented using multiple # 5 | * [x] be able to say 'run the rest' or 'skip the rest' 6 | * [x] to indicate a phase to skip use caret ```^``` 7 | * [x] specify phase either by name or by sequence 8 | * [ ] conditional runs or skips of phases 9 | * [ ] either-or phases 10 | * [x] list phases in a script 11 | * [x] reporting of phase execution 12 | * [ ] facility for logging 13 | * log results of all commands from current run separately into .err and .out files 14 | * a log with all script runs with timer, working directory variable values 15 | * [ ] ability to restart from the point it failed on previous run 16 | * [ ] properly handle ^C and other signals 17 | * [ ] record the results of earlier runs (create .phases directory?) 18 | * [ ] check if variables set in the skipped phase are used in the later executed phases 19 | * [ ] what do I do with the shebang? 20 | * [ ] warning for comments with no space after # 21 | * [ ] git-aware (as an option) 22 | * [ ] non-bash interpreters (LaTeX, psql) 23 | * other comment character 24 | * library of supported interpreters 25 | * specific interpreter for each phase 26 | * can be specified through shebang option 27 | * [ ] optional end of phase in the script ```#^phase [name]``` 28 | * [ ] verbosity and logging levels (can be set separately) 29 | * only errors 30 | * +phase names 31 | * +all stderr 32 | * +filtered stdout 33 | * +unfiltered stdout 34 | * [x] most options can be specified for either command line or in #phase 35 | * [ ] execution only specific lines (until/after/...) 36 | * [ ] printout what is being executed with optional confirmation 37 | * [ ] do not allow phases to be run in home directory 38 | * [ ] truncate logs to a certain size 39 | 40 | # Ideas for Command-line Options 41 | * [ ] --unlogged arguments to the preprocessor or specific phase in the script 42 | * [ ] --log-pipe='command' pipe log output through a specified command before saving 43 | * [ ] --list-logs list runs information with log sizes 44 | * [ ] --continue [command [run timestamp or how many run previously]] continue from the phase previous execution stopped 45 | * [ ] --unlogged command 46 | * [ ] --clean-logs [hour|day|week|months|all] 47 | * [ ] --dry-run do not execute or log, only show what will happen 48 | * [ ] --verbose [commands,output,quite] can be specified for each phase also 49 | * [ ] --workdir [directory] 50 | * [ ] --phasesdir [directory] 51 | * [ ] --[no]check check the script for preprocessor correctness 52 | * [ ] --restore-env restore environment from saved variables 53 | * [ ] --prereq [phases] phases that must be executed before the specific phase 54 | 55 | # Motivation 56 | 57 | * if implemented with standard bash facilities the original script becomes too long and it is hard to grasp what it does 58 | * the goal of phases is somewhat similar to Makefile, maven or ant but targets are hard to define if they cannot be presented as files 59 | 60 | # Similar projects 61 | 62 | * https://github.com/dymatic/bpp/blob/master/bpp/sample.bpp but it is doing something completely different 63 | 64 | # Content of the ```.phases``` directory 65 | 66 | * .config 67 | * ```basename=