├── .gitignore ├── AUTHORS ├── COPYING ├── ChangeLog ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── README.md ├── bash_completion.sh ├── configure.ac ├── modules └── stubbs │ ├── README.md │ ├── commands │ ├── add-command │ │ ├── command.option │ │ ├── default.sh │ │ ├── desc.option │ │ ├── metadata │ │ ├── module.option │ │ ├── options.sh │ │ ├── ovewrite.option │ │ └── template.option │ ├── add-module │ │ ├── default.sh │ │ ├── description.option │ │ ├── metadata │ │ └── module.option │ ├── add-option │ │ ├── arg.option │ │ ├── command.option │ │ ├── default.option │ │ ├── default.sh │ │ ├── desc.option │ │ ├── long.option │ │ ├── metadata │ │ ├── module.option │ │ ├── option.option │ │ ├── range.option │ │ ├── required.option │ │ └── short.option │ ├── archive │ │ ├── default.sh │ │ ├── file.option │ │ ├── metadata │ │ ├── modules.option │ │ ├── options.sh │ │ └── version.option │ ├── docs │ │ ├── default.sh │ │ ├── metadata │ │ ├── module.option │ │ └── options.sh │ ├── extract │ │ ├── default.sh │ │ └── metadata │ └── test │ │ ├── command.option │ │ ├── default.sh │ │ ├── logs.option │ │ ├── metadata │ │ └── module.option │ ├── lib │ ├── functions.sh │ └── test.sh │ ├── metadata │ ├── stubbs.1 │ └── templates │ ├── default.sh │ ├── extract │ ├── functions.sh │ ├── launcher │ └── test.sh ├── rerun └── setup.sh /.gitignore: -------------------------------------------------------------------------------- 1 | modules/* 2 | !modules/stubbs 3 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Created By: 2 | Alex Honor 3 | 4 | Contributions: 5 | Lee Thompson - autoconf stuff 6 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | commit 8362a0882ee0d4b11ec5a5a0f6fdb0c1425608da 2 | Author: ahonor 3 | Date: Tue Sep 20 11:39:23 2011 -0700 4 | 5 | fixed readme to continue example thread 6 | 7 | M README.md 8 | 9 | commit 466fb14ebfc8e936ed884d55f9ee01bfbe215e39 10 | Author: ahonor 11 | Date: Tue Sep 20 11:04:32 2011 -0700 12 | 13 | fixed typo in stubbs doc 14 | 15 | M modules/stubbs/README.md 16 | 17 | commit 89f6d83ee5ae7621a669b6bfc588622cca5d4fe9 18 | Author: ahonor 19 | Date: Tue Sep 20 10:50:21 2011 -0700 20 | 21 | Refactored to support simple cli syntax ( rerun module:command [options]). 22 | 23 | M README.md 24 | M bash_completion.sh 25 | M modules/stubbs/README.md 26 | M modules/stubbs/metadata 27 | M rerun 28 | 29 | commit ba8314896838a9f202f2eee4d8b058494e4e4bb0 30 | Author: ahonor 31 | Date: Mon Sep 19 10:13:43 2011 -0700 32 | 33 | renamed '.bsx' extension to '.bin' to follow mainstream convention. 34 | 35 | M README.md 36 | M bash_completion.sh 37 | M modules/stubbs/README.md 38 | M modules/stubbs/commands/archive/default.sh 39 | M rerun 40 | 41 | commit 4185e3c6d05224ddf539b1bb55f2f6d2f6f29737 42 | Author: ahonor 43 | Date: Fri Sep 16 17:43:57 2011 -0700 44 | 45 | added internal detail info about rerun archives 46 | 47 | M README.md 48 | M modules/stubbs/README.md 49 | 50 | commit 8c7b795220039cd391da03086ed99a1eaecf5f56 51 | Author: ahonor 52 | Date: Fri Sep 16 17:20:43 2011 -0700 53 | 54 | Moved "Modules" section below "Using" section since that's common 55 | sense order. 56 | 57 | M README.md 58 | 59 | commit bb1108e9ea25882bfc31a2ebc9ba4c6c3c67c89c 60 | Author: ahonor 61 | Date: Fri Sep 16 17:17:36 2011 -0700 62 | 63 | added needed motivation to description section 64 | 65 | M README.md 66 | 67 | commit c8a26b7fcaeeaa3ddc5bcf0cf3be5be750d86515 68 | Author: ahonor 69 | Date: Fri Sep 16 17:06:01 2011 -0700 70 | 71 | A few more refinements to doco and naming. 72 | 73 | M README.md 74 | M modules/stubbs/README.md 75 | M modules/stubbs/commands/add-command/default.sh 76 | A modules/stubbs/commands/add-command/template.option 77 | M modules/stubbs/commands/archive/default.sh 78 | A modules/stubbs/templates/default.sh 79 | 80 | commit cf24a7296d211c6cf8ae25fe9c1b1247cbe737dc 81 | Author: ahonor 82 | Date: Fri Sep 16 13:01:17 2011 -0700 83 | 84 | fixed minor bugs in self extracting mode 85 | 86 | M modules/stubbs/README.md 87 | M modules/stubbs/commands/add-command/default.sh 88 | M modules/stubbs/commands/archive/default.sh 89 | M modules/stubbs/commands/archive/file.option 90 | M modules/stubbs/commands/archive/options.sh 91 | M rerun 92 | 93 | commit bd9eb96a61fc11da0a48860451dbf277f940a32c 94 | Author: ahonor 95 | Date: Fri Sep 16 12:59:54 2011 -0700 96 | 97 | removed unintended verbose mode to tar execution in extract 98 | 99 | M modules/stubbs/templates/extract 100 | 101 | commit 60c4d29e6594270dd9d7fceb2c0b195136c82617 102 | Author: ahonor 103 | Date: Fri Sep 16 11:37:02 2011 -0700 104 | 105 | minor word smithing 106 | 107 | M modules/stubbs/README.md 108 | M modules/stubbs/commands/archive/default.sh 109 | M modules/stubbs/templates/extract 110 | M modules/stubbs/templates/launcher 111 | 112 | commit dbd6eaf7dfc5862a32b377f51d56c51b24591804 113 | Author: ahonor 114 | Date: Fri Sep 16 08:21:26 2011 -0700 115 | 116 | Fixed missing/incorrect option metadata 117 | 118 | M modules/stubbs/README.md 119 | A modules/stubbs/commands/add-option/metadata 120 | A modules/stubbs/commands/archive/list.option 121 | 122 | commit 5a422194b5e99911ac01ad1c26d563b506798115 123 | Author: ahonor 124 | Date: Fri Sep 16 08:17:28 2011 -0700 125 | 126 | cleaned up code for better clarity and comment 127 | 128 | M README.md 129 | M modules/stubbs/README.md 130 | M modules/stubbs/commands/add-command/default.sh 131 | M modules/stubbs/commands/add-module/default.sh 132 | M modules/stubbs/commands/add-option/default.sh 133 | M modules/stubbs/commands/archive/default.sh 134 | M modules/stubbs/commands/archive/modules.option 135 | M modules/stubbs/commands/archive/options.sh 136 | M modules/stubbs/templates/extract 137 | M modules/stubbs/templates/launcher 138 | 139 | commit 5d4a120bb9e70b8af3aa98b6cde95925e3fc969d 140 | Author: ahonor 141 | Date: Thu Sep 15 21:40:24 2011 -0700 142 | 143 | fixed doc typo 144 | 145 | M modules/stubbs/README.md 146 | 147 | commit 2fc8ac73f8e43acecc90b480ff01785a50200d7c 148 | Author: ahonor 149 | Date: Thu Sep 15 21:37:53 2011 -0700 150 | 151 | Added doco about archive command. 152 | 153 | M README.md 154 | M modules/stubbs/README.md 155 | M modules/stubbs/commands/archive/file.option 156 | M modules/stubbs/commands/archive/modules.option 157 | M rerun 158 | 159 | commit b87d3b8857c91dbbb496a56d8c3467b095ad9462 160 | Author: ahonor 161 | Date: Thu Sep 15 21:24:47 2011 -0700 162 | 163 | Initial implementation of stubbs archive command. 164 | Creates a self extracting rerun environment. 165 | 166 | A modules/stubbs/commands/archive/default.sh 167 | A modules/stubbs/commands/archive/file.option 168 | A modules/stubbs/commands/archive/metadata 169 | A modules/stubbs/commands/archive/modules.option 170 | A modules/stubbs/commands/archive/options.sh 171 | A modules/stubbs/templates/extract 172 | A modules/stubbs/templates/launcher 173 | 174 | commit bff93e0db8ce53fc747865948189673b7908e60b 175 | Author: ahonor 176 | Date: Thu Sep 15 12:24:34 2011 -0700 177 | 178 | added stubbs doco about option usage 179 | 180 | M modules/stubbs/README.md 181 | 182 | commit 902f7477d167328c1f6fd1513eea22c160524796 183 | Author: ahonor 184 | Date: Thu Sep 15 11:12:59 2011 -0700 185 | 186 | touched up stubbs docs 187 | 188 | M modules/stubbs/README.md 189 | 190 | commit 875d97b478021a7d57e80852f4712e5586ac40b1 191 | Author: ahonor 192 | Date: Thu Sep 15 10:48:51 2011 -0700 193 | 194 | renamed command.sh to functions.sh to make its purpose obvious. 195 | cleaned up function names to be more consistent. 196 | 197 | M README.md 198 | M modules/stubbs/README.md 199 | M modules/stubbs/commands/add-command/default.sh 200 | M modules/stubbs/commands/add-module/default.sh 201 | M modules/stubbs/commands/add-option/default.sh 202 | D modules/stubbs/lib/command.sh 203 | A modules/stubbs/lib/functions.sh 204 | M rerun 205 | 206 | commit e0fde0f71ca49df799b081e64b5fa47c29528322 207 | Author: ahonor 208 | Date: Wed Sep 14 16:13:35 2011 -0700 209 | 210 | added license info to readme 211 | 212 | M README.md 213 | M modules/stubbs/README.md 214 | 215 | commit 5b10e157ffca6a2e6edc4384e9e8f542740aad5f 216 | Author: ahonor 217 | Date: Wed Sep 14 15:02:19 2011 -0700 218 | 219 | fixed bug in add-option that assumed a mac (sad sack) nocase file system. 220 | 221 | M modules/stubbs/commands/add-option/default.sh 222 | M modules/stubbs/lib/command.sh 223 | 224 | commit 88b56068b0a080792020b9bac44f6199e64c0afe 225 | Author: ahonor 226 | Date: Wed Sep 14 11:48:05 2011 -0700 227 | 228 | updated doco 229 | 230 | M README.md 231 | M modules/stubbs/README.md 232 | 233 | commit e8d0a7f84b38cb9609d2cbde5bb2e98d08d19672 234 | Author: ahonor 235 | Date: Wed Sep 14 09:38:37 2011 -0700 236 | 237 | Provided -overwrite <> flag for add-command. 238 | Cleaned up cruft. 239 | 240 | M modules/stubbs/README.md 241 | M modules/stubbs/commands/add-command/default.sh 242 | A modules/stubbs/commands/add-command/ovewrite.option 243 | M modules/stubbs/commands/add-module/default.sh 244 | M modules/stubbs/commands/add-option/default.sh 245 | 246 | commit 1e83c44fff0656801df8acc5271a6162b6be6233 247 | Author: ahonor 248 | Date: Wed Sep 14 08:33:57 2011 -0700 249 | 250 | Updated add-command to make sourcing the options.sh conditional 251 | on it existing. 252 | 253 | M modules/stubbs/README.md 254 | M modules/stubbs/commands/add-command/default.sh 255 | 256 | commit 742822dc59e4d4ebd3f9ffa5cf11654e05c8e6a5 257 | Author: ahonor 258 | Date: Wed Sep 14 07:57:23 2011 -0700 259 | 260 | Updated doc. 261 | 262 | M README.md 263 | M modules/stubbs/README.md 264 | 265 | commit 21bf8475d9c306051d8b43ad116c3b8cc4405283 266 | Author: ahonor 267 | Date: Tue Sep 13 20:10:02 2011 -0700 268 | 269 | fixed egregious bugs in stubbs. 270 | 271 | M modules/stubbs/commands/add-command/default.sh 272 | M modules/stubbs/commands/add-module/default.sh 273 | M modules/stubbs/commands/add-option/default.sh 274 | M modules/stubbs/lib/command.sh 275 | M rerun 276 | 277 | commit 50e03af46bc037bbd709469e67d5c2bff03ce8e9 278 | Author: ahonor 279 | Date: Tue Sep 13 19:59:21 2011 -0700 280 | 281 | Added missing option metadata file for add-module. 282 | 283 | M modules/stubbs/README.md 284 | A modules/stubbs/commands/add-module/description.option 285 | 286 | commit f507549feec5bb0b8f1e53f55efa1ece91e0f931 287 | Author: ahonor 288 | Date: Tue Sep 13 19:50:41 2011 -0700 289 | 290 | elaborated doco 291 | 292 | M modules/stubbs/README.md 293 | 294 | commit 6471638a6e5abbc672ad7a261da40e9c48903135 295 | Author: ahonor 296 | Date: Tue Sep 13 19:41:32 2011 -0700 297 | 298 | updated doco 299 | 300 | M README.md 301 | 302 | commit bfc46c3323b6a67346803b99295b0b7fa1ed5038 303 | Author: ahonor 304 | Date: Tue Sep 13 19:38:18 2011 -0700 305 | 306 | Changed module and command metadata filename to "metadata". 307 | 308 | M modules/stubbs/commands/add-command/default.sh 309 | D modules/stubbs/commands/add-module/command 310 | M modules/stubbs/commands/add-module/default.sh 311 | A modules/stubbs/commands/add-module/metadata 312 | D modules/stubbs/etc/module 313 | A modules/stubbs/metadata 314 | M rerun 315 | 316 | commit eaddb6927e23d96ec88123f4b2a37667fb1c0f18 317 | Author: ahonor 318 | Date: Tue Sep 13 19:30:17 2011 -0700 319 | 320 | fixed doco 321 | 322 | M modules/stubbs/README.md 323 | 324 | commit 308f9b955216f274ee5303a5bae7a50ee346b63a 325 | Author: ahonor 326 | Date: Tue Sep 13 19:28:32 2011 -0700 327 | 328 | Refactored to use a simplified directory structure. 329 | Moved options and other command metadata into MODULE_DIR/commands. 330 | 331 | M README.md 332 | M bash_completion.sh 333 | D modules/stubbs/commands/add-command.sh 334 | A modules/stubbs/commands/add-command/default.sh 335 | A modules/stubbs/commands/add-command/module.option 336 | A modules/stubbs/commands/add-command/name.option 337 | D modules/stubbs/commands/add-module.sh 338 | A modules/stubbs/commands/add-module/command 339 | A modules/stubbs/commands/add-module/default.sh 340 | A modules/stubbs/commands/add-module/name.option 341 | D modules/stubbs/commands/add-option.sh 342 | A modules/stubbs/commands/add-option/arg.option 343 | A modules/stubbs/commands/add-option/command.option 344 | A modules/stubbs/commands/add-option/default.sh 345 | A modules/stubbs/commands/add-option/desc.option 346 | A modules/stubbs/commands/add-option/module.option 347 | A modules/stubbs/commands/add-option/name.option 348 | A modules/stubbs/commands/add-option/required.option 349 | D modules/stubbs/etc/commands/add-command/module.option 350 | D modules/stubbs/etc/commands/add-command/name.option 351 | D modules/stubbs/etc/commands/add-module/add-module.command 352 | D modules/stubbs/etc/commands/add-module/command 353 | D modules/stubbs/etc/commands/add-module/name.option 354 | D modules/stubbs/etc/commands/add-option/arg.option 355 | D modules/stubbs/etc/commands/add-option/command.option 356 | D modules/stubbs/etc/commands/add-option/desc.option 357 | D modules/stubbs/etc/commands/add-option/module.option 358 | D modules/stubbs/etc/commands/add-option/name.option 359 | D modules/stubbs/etc/commands/add-option/required.option 360 | M modules/stubbs/lib/command.sh 361 | M rerun 362 | 363 | commit eaff8003ca3993f71b8bdb0f74e892045af5009e 364 | Author: ahonor 365 | Date: Tue Sep 13 18:02:31 2011 -0700 366 | 367 | fixed typo 368 | 369 | M modules/stubbs/README.md 370 | 371 | commit 90e83c39e62ef72ff0749a6cc35546d7375329aa 372 | Author: ahonor 373 | Date: Tue Sep 13 18:01:28 2011 -0700 374 | 375 | Updated stubbs modules to use new convention on option handling. 376 | 377 | M README.md 378 | M modules/stubbs/README.md 379 | M modules/stubbs/commands/add-command.sh 380 | M modules/stubbs/commands/add-option.sh 381 | M modules/stubbs/lib/command.sh 382 | M rerun 383 | 384 | commit 24b5620a67b318a3b179cd07ced057c9bfe77a9e 385 | Author: ahonor 386 | Date: Tue Sep 13 12:47:04 2011 -0700 387 | 388 | Updated doc w/ command completion examples. 389 | 390 | M README.md 391 | M modules/stubbs/commands/add-command.sh 392 | M modules/stubbs/commands/add-option.sh 393 | M rerun 394 | 395 | commit 12e23fa237268691a650ef166b9fbbe6af11c3fb 396 | Author: ahonor 397 | Date: Tue Sep 13 12:39:30 2011 -0700 398 | 399 | Added bash completion. 400 | Renamed command metadata file to "command" 401 | 402 | A bash_completion.sh 403 | A modules/stubbs/etc/commands/add-module/command 404 | 405 | commit c4ca0733d438d85d6f8d5eb002c01974b78dc0cf 406 | Author: ahonor 407 | Date: Tue Sep 13 10:35:10 2011 -0700 408 | 409 | added more description 410 | 411 | M README.md 412 | 413 | commit c1702639d473667deda2d22eb2bf5a2db86ffe63 414 | Author: ahonor 415 | Date: Tue Sep 13 10:21:53 2011 -0700 416 | 417 | fixed examples to be consistent 418 | 419 | M README.md 420 | M modules/stubbs/README.md 421 | 422 | commit 55d7b33a1cc095cbefbb6ed73fe4aed615f3d047 423 | Author: ahonor 424 | Date: Mon Sep 12 20:19:26 2011 -0700 425 | 426 | doc fixup 427 | 428 | M README.md 429 | 430 | commit 3f94c4829e9bad4cf2b2dae16406dba39e3f3193 431 | Author: ahonor 432 | Date: Mon Sep 12 20:02:03 2011 -0700 433 | 434 | fixed examples 435 | 436 | M README.md 437 | 438 | commit 10b5d2c1c3266c755d90a690cc90b64e75e2d926 439 | Author: ahonor 440 | Date: Mon Sep 12 19:50:27 2011 -0700 441 | 442 | fixed typo 443 | 444 | M modules/stubbs/README.md 445 | 446 | commit 48ed92febdbb2cc7f92060c64af36fdbe95088b4 447 | Author: ahonor 448 | Date: Mon Sep 12 19:48:39 2011 -0700 449 | 450 | first commit 451 | 452 | A README.md 453 | A modules/stubbs/README.md 454 | A modules/stubbs/commands/add-command.sh 455 | A modules/stubbs/commands/add-module.sh 456 | A modules/stubbs/commands/add-option.sh 457 | A modules/stubbs/etc/commands/add-command/module.option 458 | A modules/stubbs/etc/commands/add-command/name.option 459 | A modules/stubbs/etc/commands/add-module/add-module.command 460 | A modules/stubbs/etc/commands/add-module/name.option 461 | A modules/stubbs/etc/commands/add-option/arg.option 462 | A modules/stubbs/etc/commands/add-option/command.option 463 | A modules/stubbs/etc/commands/add-option/desc.option 464 | A modules/stubbs/etc/commands/add-option/module.option 465 | A modules/stubbs/etc/commands/add-option/name.option 466 | A modules/stubbs/etc/commands/add-option/required.option 467 | A modules/stubbs/etc/module 468 | A modules/stubbs/lib/command.sh 469 | A rerun 470 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | # Create by thompson@dtosolutions.com 27SEP11 2 | # copyright DTOSOLUTIONS, 2011 3 | 4 | ## Process this file with automake to produce Makefile.in 5 | 6 | #ACLOCAL_AMFLAGS = -I m4 --install 7 | 8 | # setup is only used by distribution developers, not package developers. 9 | # Still, as a matter of allowing patching, its not a bad idea to distribute 10 | # the developer setup script in the tarball. 11 | EXTRA_DIST = setup.sh bash_completion.sh 12 | 13 | # README.md is expected in Github projects, good stuff in it, so we'll 14 | # distribute it and install it with the package in the doc directory. 15 | dist_doc_DATA = README.md INSTALL COPYING AUTHORS README NEWS ChangeLog 16 | 17 | # the main script 18 | dist_bin_SCRIPTS = rerun 19 | 20 | # man pages here 21 | dist_man_MANS = modules/stubbs/stubbs.1 22 | 23 | # The module 24 | nobase_dist_pkgdata_DATA = \ 25 | modules/stubbs/commands/add-command/default.sh \ 26 | modules/stubbs/commands/add-command/metadata \ 27 | modules/stubbs/commands/add-command/module.option \ 28 | modules/stubbs/commands/add-command/command.option \ 29 | modules/stubbs/commands/add-command/options.sh \ 30 | modules/stubbs/commands/add-command/ovewrite.option \ 31 | modules/stubbs/commands/add-command/template.option \ 32 | modules/stubbs/commands/add-module/default.sh \ 33 | modules/stubbs/commands/add-module/description.option \ 34 | modules/stubbs/commands/add-module/metadata \ 35 | modules/stubbs/commands/add-module/module.option \ 36 | modules/stubbs/commands/add-option/arg.option \ 37 | modules/stubbs/commands/add-option/command.option \ 38 | modules/stubbs/commands/add-option/default.sh \ 39 | modules/stubbs/commands/add-option/desc.option \ 40 | modules/stubbs/commands/add-option/metadata \ 41 | modules/stubbs/commands/add-option/module.option \ 42 | modules/stubbs/commands/add-option/option.option \ 43 | modules/stubbs/commands/add-option/required.option \ 44 | modules/stubbs/commands/archive/default.sh \ 45 | modules/stubbs/commands/archive/file.option \ 46 | modules/stubbs/commands/archive/metadata \ 47 | modules/stubbs/commands/archive/modules.option \ 48 | modules/stubbs/commands/archive/options.sh \ 49 | modules/stubbs/commands/docs/default.sh \ 50 | modules/stubbs/commands/docs/metadata \ 51 | modules/stubbs/commands/docs/module.option \ 52 | modules/stubbs/commands/docs/options.sh \ 53 | modules/stubbs/commands/test/default.sh \ 54 | modules/stubbs/commands/test/logs.option \ 55 | modules/stubbs/commands/test/metadata \ 56 | modules/stubbs/commands/test/module.option \ 57 | modules/stubbs/lib/functions.sh \ 58 | modules/stubbs/metadata \ 59 | modules/stubbs/README.md \ 60 | modules/stubbs/stubbs.1 \ 61 | modules/stubbs/templates/default.sh \ 62 | modules/stubbs/templates/extract \ 63 | modules/stubbs/templates/functions.sh \ 64 | modules/stubbs/templates/launcher \ 65 | modules/stubbs/templates/test.sh 66 | 67 | # bash completion script into $(sysconfdir)/bash_completion.d/ 68 | # most unix implementations do not set the executable permission 69 | # so well ship it as a data file. Its a bit wonky to have 70 | # $(prefix)/bin/rerun and $(prefix)/etc/bash_completion.d/rerun 71 | # being the same target name so I'll use a install hook 72 | 73 | install-data-hook: 74 | mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d 75 | cp -p $(srcdir)/bash_completion.sh \ 76 | $(DESTDIR)$(sysconfdir)/bash_completion.d/$(PACKAGE) 77 | 78 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 6 | # Inc. 7 | # This Makefile.in is free software; the Free Software Foundation 8 | # gives unlimited permission to copy and/or distribute it, 9 | # with or without modifications, as long as this notice is preserved. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 | # PARTICULAR PURPOSE. 15 | 16 | @SET_MAKE@ 17 | 18 | # Create by thompson@dtosolutions.com 27SEP11 19 | # copyright DTOSOLUTIONS, 2011 20 | 21 | #ACLOCAL_AMFLAGS = -I m4 --install 22 | 23 | 24 | VPATH = @srcdir@ 25 | pkgdatadir = $(datadir)/@PACKAGE@ 26 | pkgincludedir = $(includedir)/@PACKAGE@ 27 | pkglibdir = $(libdir)/@PACKAGE@ 28 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 29 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 30 | install_sh_DATA = $(install_sh) -c -m 644 31 | install_sh_PROGRAM = $(install_sh) -c 32 | install_sh_SCRIPT = $(install_sh) -c 33 | INSTALL_HEADER = $(INSTALL_DATA) 34 | transform = $(program_transform_name) 35 | NORMAL_INSTALL = : 36 | PRE_INSTALL = : 37 | POST_INSTALL = : 38 | NORMAL_UNINSTALL = : 39 | PRE_UNINSTALL = : 40 | POST_UNINSTALL = : 41 | subdir = . 42 | DIST_COMMON = README $(am__configure_deps) $(dist_bin_SCRIPTS) \ 43 | $(dist_doc_DATA) $(dist_man_MANS) $(nobase_dist_pkgdata_DATA) \ 44 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ 45 | $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ 46 | config/install-sh config/missing 47 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 48 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 49 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 50 | $(ACLOCAL_M4) 51 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 52 | configure.lineno config.status.lineno 53 | mkinstalldirs = $(install_sh) -d 54 | CONFIG_CLEAN_FILES = 55 | CONFIG_CLEAN_VPATH_FILES = 56 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 57 | am__vpath_adj = case $$p in \ 58 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 59 | *) f=$$p;; \ 60 | esac; 61 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 62 | am__install_max = 40 63 | am__nobase_strip_setup = \ 64 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 65 | am__nobase_strip = \ 66 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 67 | am__nobase_list = $(am__nobase_strip_setup); \ 68 | for p in $$list; do echo "$$p $$p"; done | \ 69 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 70 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 71 | if (++n[$$2] == $(am__install_max)) \ 72 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 73 | END { for (dir in files) print dir, files[dir] }' 74 | am__base_list = \ 75 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 76 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 77 | am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ 78 | "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgdatadir)" 79 | SCRIPTS = $(dist_bin_SCRIPTS) 80 | SOURCES = 81 | DIST_SOURCES = 82 | man1dir = $(mandir)/man1 83 | NROFF = nroff 84 | MANS = $(dist_man_MANS) 85 | DATA = $(dist_doc_DATA) $(nobase_dist_pkgdata_DATA) 86 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 87 | distdir = $(PACKAGE)-$(VERSION) 88 | top_distdir = $(distdir) 89 | am__remove_distdir = \ 90 | { test ! -d "$(distdir)" \ 91 | || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ 92 | && rm -fr "$(distdir)"; }; } 93 | DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip 94 | GZIP_ENV = --best 95 | distuninstallcheck_listfiles = find . -type f -print 96 | distcleancheck_listfiles = find . -type f -print 97 | ACLOCAL = @ACLOCAL@ 98 | AMTAR = @AMTAR@ 99 | AUTOCONF = @AUTOCONF@ 100 | AUTOHEADER = @AUTOHEADER@ 101 | AUTOMAKE = @AUTOMAKE@ 102 | AWK = @AWK@ 103 | CYGPATH_W = @CYGPATH_W@ 104 | DEFS = @DEFS@ 105 | ECHO_C = @ECHO_C@ 106 | ECHO_N = @ECHO_N@ 107 | ECHO_T = @ECHO_T@ 108 | INSTALL = @INSTALL@ 109 | INSTALL_DATA = @INSTALL_DATA@ 110 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 111 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 112 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 113 | LIBOBJS = @LIBOBJS@ 114 | LIBS = @LIBS@ 115 | LTLIBOBJS = @LTLIBOBJS@ 116 | MAKEINFO = @MAKEINFO@ 117 | MKDIR_P = @MKDIR_P@ 118 | PACKAGE = @PACKAGE@ 119 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 120 | PACKAGE_NAME = @PACKAGE_NAME@ 121 | PACKAGE_STRING = @PACKAGE_STRING@ 122 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 123 | PACKAGE_URL = @PACKAGE_URL@ 124 | PACKAGE_VERSION = @PACKAGE_VERSION@ 125 | PATH_SEPARATOR = @PATH_SEPARATOR@ 126 | SET_MAKE = @SET_MAKE@ 127 | SHELL = @SHELL@ 128 | STRIP = @STRIP@ 129 | VERSION = @VERSION@ 130 | abs_builddir = @abs_builddir@ 131 | abs_srcdir = @abs_srcdir@ 132 | abs_top_builddir = @abs_top_builddir@ 133 | abs_top_srcdir = @abs_top_srcdir@ 134 | am__leading_dot = @am__leading_dot@ 135 | am__tar = @am__tar@ 136 | am__untar = @am__untar@ 137 | bindir = @bindir@ 138 | build_alias = @build_alias@ 139 | builddir = @builddir@ 140 | datadir = @datadir@ 141 | datarootdir = @datarootdir@ 142 | docdir = @docdir@ 143 | dvidir = @dvidir@ 144 | exec_prefix = @exec_prefix@ 145 | host_alias = @host_alias@ 146 | htmldir = @htmldir@ 147 | includedir = @includedir@ 148 | infodir = @infodir@ 149 | install_sh = @install_sh@ 150 | libdir = @libdir@ 151 | libexecdir = @libexecdir@ 152 | localedir = @localedir@ 153 | localstatedir = @localstatedir@ 154 | mandir = @mandir@ 155 | mkdir_p = @mkdir_p@ 156 | oldincludedir = @oldincludedir@ 157 | pdfdir = @pdfdir@ 158 | prefix = @prefix@ 159 | program_transform_name = @program_transform_name@ 160 | psdir = @psdir@ 161 | sbindir = @sbindir@ 162 | sharedstatedir = @sharedstatedir@ 163 | srcdir = @srcdir@ 164 | sysconfdir = @sysconfdir@ 165 | target_alias = @target_alias@ 166 | top_build_prefix = @top_build_prefix@ 167 | top_builddir = @top_builddir@ 168 | top_srcdir = @top_srcdir@ 169 | 170 | # setup is only used by distribution developers, not package developers. 171 | # Still, as a matter of allowing patching, its not a bad idea to distribute 172 | # the developer setup script in the tarball. 173 | EXTRA_DIST = setup.sh bash_completion.sh 174 | 175 | # README.md is expected in Github projects, good stuff in it, so we'll 176 | # distribute it and install it with the package in the doc directory. 177 | dist_doc_DATA = README.md INSTALL COPYING AUTHORS README NEWS ChangeLog 178 | 179 | # the main script 180 | dist_bin_SCRIPTS = rerun 181 | 182 | # man pages here 183 | dist_man_MANS = modules/stubbs/stubbs.1 184 | 185 | # The module 186 | nobase_dist_pkgdata_DATA = \ 187 | modules/stubbs/commands/add-command/default.sh \ 188 | modules/stubbs/commands/add-command/metadata \ 189 | modules/stubbs/commands/add-command/module.option \ 190 | modules/stubbs/commands/add-command/name.option \ 191 | modules/stubbs/commands/add-command/options.sh \ 192 | modules/stubbs/commands/add-command/ovewrite.option \ 193 | modules/stubbs/commands/add-command/template.option \ 194 | modules/stubbs/commands/add-module/default.sh \ 195 | modules/stubbs/commands/add-module/description.option \ 196 | modules/stubbs/commands/add-module/metadata \ 197 | modules/stubbs/commands/add-module/name.option \ 198 | modules/stubbs/commands/add-option/arg.option \ 199 | modules/stubbs/commands/add-option/command.option \ 200 | modules/stubbs/commands/add-option/default.sh \ 201 | modules/stubbs/commands/add-option/desc.option \ 202 | modules/stubbs/commands/add-option/metadata \ 203 | modules/stubbs/commands/add-option/module.option \ 204 | modules/stubbs/commands/add-option/name.option \ 205 | modules/stubbs/commands/add-option/required.option \ 206 | modules/stubbs/commands/archive/default.sh \ 207 | modules/stubbs/commands/archive/file.option \ 208 | modules/stubbs/commands/archive/metadata \ 209 | modules/stubbs/commands/archive/modules.option \ 210 | modules/stubbs/commands/archive/options.sh \ 211 | modules/stubbs/commands/docs/default.sh \ 212 | modules/stubbs/commands/docs/metadata \ 213 | modules/stubbs/commands/docs/module.option \ 214 | modules/stubbs/commands/docs/options.sh \ 215 | modules/stubbs/commands/test/default.sh \ 216 | modules/stubbs/commands/test/logs.option \ 217 | modules/stubbs/commands/test/metadata \ 218 | modules/stubbs/commands/test/name.option \ 219 | modules/stubbs/lib/functions.sh \ 220 | modules/stubbs/metadata \ 221 | modules/stubbs/README.md \ 222 | modules/stubbs/stubbs.1 \ 223 | modules/stubbs/templates/default.sh \ 224 | modules/stubbs/templates/extract \ 225 | modules/stubbs/templates/functions.sh \ 226 | modules/stubbs/templates/launcher \ 227 | modules/stubbs/templates/test.sh 228 | 229 | all: all-am 230 | 231 | .SUFFIXES: 232 | am--refresh: 233 | @: 234 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 235 | @for dep in $?; do \ 236 | case '$(am__configure_deps)' in \ 237 | *$$dep*) \ 238 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ 239 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ 240 | && exit 0; \ 241 | exit 1;; \ 242 | esac; \ 243 | done; \ 244 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ 245 | $(am__cd) $(top_srcdir) && \ 246 | $(AUTOMAKE) --gnu Makefile 247 | .PRECIOUS: Makefile 248 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 249 | @case '$?' in \ 250 | *config.status*) \ 251 | echo ' $(SHELL) ./config.status'; \ 252 | $(SHELL) ./config.status;; \ 253 | *) \ 254 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 255 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 256 | esac; 257 | 258 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 259 | $(SHELL) ./config.status --recheck 260 | 261 | $(top_srcdir)/configure: $(am__configure_deps) 262 | $(am__cd) $(srcdir) && $(AUTOCONF) 263 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 264 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 265 | $(am__aclocal_m4_deps): 266 | install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) 267 | @$(NORMAL_INSTALL) 268 | test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" 269 | @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ 270 | for p in $$list; do \ 271 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 272 | if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ 273 | done | \ 274 | sed -e 'p;s,.*/,,;n' \ 275 | -e 'h;s|.*|.|' \ 276 | -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ 277 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ 278 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 279 | if ($$2 == $$4) { files[d] = files[d] " " $$1; \ 280 | if (++n[d] == $(am__install_max)) { \ 281 | print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ 282 | else { print "f", d "/" $$4, $$1 } } \ 283 | END { for (d in files) print "f", d, files[d] }' | \ 284 | while read type dir files; do \ 285 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 286 | test -z "$$files" || { \ 287 | echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 288 | $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 289 | } \ 290 | ; done 291 | 292 | uninstall-dist_binSCRIPTS: 293 | @$(NORMAL_UNINSTALL) 294 | @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ 295 | files=`for p in $$list; do echo "$$p"; done | \ 296 | sed -e 's,.*/,,;$(transform)'`; \ 297 | test -n "$$list" || exit 0; \ 298 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 299 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 300 | install-man1: $(dist_man_MANS) 301 | @$(NORMAL_INSTALL) 302 | test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" 303 | @list=''; test -n "$(man1dir)" || exit 0; \ 304 | { for i in $$list; do echo "$$i"; done; \ 305 | l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ 306 | sed -n '/\.1[a-z]*$$/p'; \ 307 | } | while read p; do \ 308 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 309 | echo "$$d$$p"; echo "$$p"; \ 310 | done | \ 311 | sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 312 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ 313 | sed 'N;N;s,\n, ,g' | { \ 314 | list=; while read file base inst; do \ 315 | if test "$$base" = "$$inst"; then list="$$list $$file"; else \ 316 | echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ 317 | $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ 318 | fi; \ 319 | done; \ 320 | for i in $$list; do echo "$$i"; done | $(am__base_list) | \ 321 | while read files; do \ 322 | test -z "$$files" || { \ 323 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ 324 | $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ 325 | done; } 326 | 327 | uninstall-man1: 328 | @$(NORMAL_UNINSTALL) 329 | @list=''; test -n "$(man1dir)" || exit 0; \ 330 | files=`{ for i in $$list; do echo "$$i"; done; \ 331 | l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ 332 | sed -n '/\.1[a-z]*$$/p'; \ 333 | } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 334 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ 335 | test -z "$$files" || { \ 336 | echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ 337 | cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } 338 | install-dist_docDATA: $(dist_doc_DATA) 339 | @$(NORMAL_INSTALL) 340 | test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" 341 | @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ 342 | for p in $$list; do \ 343 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 344 | echo "$$d$$p"; \ 345 | done | $(am__base_list) | \ 346 | while read files; do \ 347 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ 348 | $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ 349 | done 350 | 351 | uninstall-dist_docDATA: 352 | @$(NORMAL_UNINSTALL) 353 | @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ 354 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 355 | test -n "$$files" || exit 0; \ 356 | echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ 357 | cd "$(DESTDIR)$(docdir)" && rm -f $$files 358 | install-nobase_dist_pkgdataDATA: $(nobase_dist_pkgdata_DATA) 359 | @$(NORMAL_INSTALL) 360 | test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" 361 | @list='$(nobase_dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ 362 | $(am__nobase_list) | while read dir files; do \ 363 | xfiles=; for file in $$files; do \ 364 | if test -f "$$file"; then xfiles="$$xfiles $$file"; \ 365 | else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ 366 | test -z "$$xfiles" || { \ 367 | test "x$$dir" = x. || { \ 368 | echo "$(MKDIR_P) '$(DESTDIR)$(pkgdatadir)/$$dir'"; \ 369 | $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)/$$dir"; }; \ 370 | echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(pkgdatadir)/$$dir'"; \ 371 | $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(pkgdatadir)/$$dir" || exit $$?; }; \ 372 | done 373 | 374 | uninstall-nobase_dist_pkgdataDATA: 375 | @$(NORMAL_UNINSTALL) 376 | @list='$(nobase_dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ 377 | $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ 378 | test -n "$$files" || exit 0; \ 379 | echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ 380 | cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files 381 | tags: TAGS 382 | TAGS: 383 | 384 | ctags: CTAGS 385 | CTAGS: 386 | 387 | 388 | distdir: $(DISTFILES) 389 | @list='$(MANS)'; if test -n "$$list"; then \ 390 | list=`for p in $$list; do \ 391 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 392 | if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ 393 | if test -n "$$list" && \ 394 | grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ 395 | echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ 396 | grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ 397 | echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ 398 | echo " typically \`make maintainer-clean' will remove them" >&2; \ 399 | exit 1; \ 400 | else :; fi; \ 401 | else :; fi 402 | $(am__remove_distdir) 403 | test -d "$(distdir)" || mkdir "$(distdir)" 404 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 405 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 406 | list='$(DISTFILES)'; \ 407 | dist_files=`for file in $$list; do echo $$file; done | \ 408 | sed -e "s|^$$srcdirstrip/||;t" \ 409 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 410 | case $$dist_files in \ 411 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 412 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 413 | sort -u` ;; \ 414 | esac; \ 415 | for file in $$dist_files; do \ 416 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 417 | if test -d $$d/$$file; then \ 418 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 419 | if test -d "$(distdir)/$$file"; then \ 420 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 421 | fi; \ 422 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 423 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 424 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 425 | fi; \ 426 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 427 | else \ 428 | test -f "$(distdir)/$$file" \ 429 | || cp -p $$d/$$file "$(distdir)/$$file" \ 430 | || exit 1; \ 431 | fi; \ 432 | done 433 | -test -n "$(am__skip_mode_fix)" \ 434 | || find "$(distdir)" -type d ! -perm -755 \ 435 | -exec chmod u+rwx,go+rx {} \; -o \ 436 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ 437 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ 438 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 439 | || chmod -R a+r "$(distdir)" 440 | dist-gzip: distdir 441 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 442 | $(am__remove_distdir) 443 | dist-bzip2: distdir 444 | tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 445 | $(am__remove_distdir) 446 | 447 | dist-lzma: distdir 448 | tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma 449 | $(am__remove_distdir) 450 | 451 | dist-xz: distdir 452 | tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz 453 | $(am__remove_distdir) 454 | 455 | dist-tarZ: distdir 456 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 457 | $(am__remove_distdir) 458 | 459 | dist-shar: distdir 460 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz 461 | $(am__remove_distdir) 462 | dist-zip: distdir 463 | -rm -f $(distdir).zip 464 | zip -rq $(distdir).zip $(distdir) 465 | $(am__remove_distdir) 466 | 467 | dist dist-all: distdir 468 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 469 | tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 470 | -rm -f $(distdir).zip 471 | zip -rq $(distdir).zip $(distdir) 472 | $(am__remove_distdir) 473 | 474 | # This target untars the dist file and tries a VPATH configuration. Then 475 | # it guarantees that the distribution is self-contained by making another 476 | # tarfile. 477 | distcheck: dist 478 | case '$(DIST_ARCHIVES)' in \ 479 | *.tar.gz*) \ 480 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ 481 | *.tar.bz2*) \ 482 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ 483 | *.tar.lzma*) \ 484 | lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ 485 | *.tar.xz*) \ 486 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ 487 | *.tar.Z*) \ 488 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 489 | *.shar.gz*) \ 490 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ 491 | *.zip*) \ 492 | unzip $(distdir).zip ;;\ 493 | esac 494 | chmod -R a-w $(distdir); chmod a+w $(distdir) 495 | mkdir $(distdir)/_build 496 | mkdir $(distdir)/_inst 497 | chmod a-w $(distdir) 498 | test -d $(distdir)/_build || exit 0; \ 499 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 500 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 501 | && am__cwd=`pwd` \ 502 | && $(am__cd) $(distdir)/_build \ 503 | && ../configure --srcdir=.. --prefix="$$dc_install_base" \ 504 | $(DISTCHECK_CONFIGURE_FLAGS) \ 505 | && $(MAKE) $(AM_MAKEFLAGS) \ 506 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ 507 | && $(MAKE) $(AM_MAKEFLAGS) check \ 508 | && $(MAKE) $(AM_MAKEFLAGS) install \ 509 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 510 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ 511 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ 512 | distuninstallcheck \ 513 | && chmod -R a-w "$$dc_install_base" \ 514 | && ({ \ 515 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 516 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 517 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ 518 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ 519 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ 520 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ 521 | && rm -rf "$$dc_destdir" \ 522 | && $(MAKE) $(AM_MAKEFLAGS) dist \ 523 | && rm -rf $(DIST_ARCHIVES) \ 524 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ 525 | && cd "$$am__cwd" \ 526 | || exit 1 527 | $(am__remove_distdir) 528 | @(echo "$(distdir) archives ready for distribution: "; \ 529 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 530 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' 531 | distuninstallcheck: 532 | @$(am__cd) '$(distuninstallcheck_dir)' \ 533 | && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ 534 | || { echo "ERROR: files left after uninstall:" ; \ 535 | if test -n "$(DESTDIR)"; then \ 536 | echo " (check DESTDIR support)"; \ 537 | fi ; \ 538 | $(distuninstallcheck_listfiles) ; \ 539 | exit 1; } >&2 540 | distcleancheck: distclean 541 | @if test '$(srcdir)' = . ; then \ 542 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ 543 | exit 1 ; \ 544 | fi 545 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ 546 | || { echo "ERROR: files left in build directory after distclean:" ; \ 547 | $(distcleancheck_listfiles) ; \ 548 | exit 1; } >&2 549 | check-am: all-am 550 | check: check-am 551 | all-am: Makefile $(SCRIPTS) $(MANS) $(DATA) 552 | installdirs: 553 | for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgdatadir)"; do \ 554 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 555 | done 556 | install: install-am 557 | install-exec: install-exec-am 558 | install-data: install-data-am 559 | uninstall: uninstall-am 560 | 561 | install-am: all-am 562 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 563 | 564 | installcheck: installcheck-am 565 | install-strip: 566 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 567 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 568 | `test -z '$(STRIP)' || \ 569 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 570 | mostlyclean-generic: 571 | 572 | clean-generic: 573 | 574 | distclean-generic: 575 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 576 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 577 | 578 | maintainer-clean-generic: 579 | @echo "This command is intended for maintainers to use" 580 | @echo "it deletes files that may require special tools to rebuild." 581 | clean: clean-am 582 | 583 | clean-am: clean-generic mostlyclean-am 584 | 585 | distclean: distclean-am 586 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 587 | -rm -f Makefile 588 | distclean-am: clean-am distclean-generic 589 | 590 | dvi: dvi-am 591 | 592 | dvi-am: 593 | 594 | html: html-am 595 | 596 | html-am: 597 | 598 | info: info-am 599 | 600 | info-am: 601 | 602 | install-data-am: install-dist_docDATA install-man \ 603 | install-nobase_dist_pkgdataDATA 604 | @$(NORMAL_INSTALL) 605 | $(MAKE) $(AM_MAKEFLAGS) install-data-hook 606 | install-dvi: install-dvi-am 607 | 608 | install-dvi-am: 609 | 610 | install-exec-am: install-dist_binSCRIPTS 611 | 612 | install-html: install-html-am 613 | 614 | install-html-am: 615 | 616 | install-info: install-info-am 617 | 618 | install-info-am: 619 | 620 | install-man: install-man1 621 | 622 | install-pdf: install-pdf-am 623 | 624 | install-pdf-am: 625 | 626 | install-ps: install-ps-am 627 | 628 | install-ps-am: 629 | 630 | installcheck-am: 631 | 632 | maintainer-clean: maintainer-clean-am 633 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 634 | -rm -rf $(top_srcdir)/autom4te.cache 635 | -rm -f Makefile 636 | maintainer-clean-am: distclean-am maintainer-clean-generic 637 | 638 | mostlyclean: mostlyclean-am 639 | 640 | mostlyclean-am: mostlyclean-generic 641 | 642 | pdf: pdf-am 643 | 644 | pdf-am: 645 | 646 | ps: ps-am 647 | 648 | ps-am: 649 | 650 | uninstall-am: uninstall-dist_binSCRIPTS uninstall-dist_docDATA \ 651 | uninstall-man uninstall-nobase_dist_pkgdataDATA 652 | 653 | uninstall-man: uninstall-man1 654 | 655 | .MAKE: install-am install-data-am install-strip 656 | 657 | .PHONY: all all-am am--refresh check check-am clean clean-generic dist \ 658 | dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ 659 | dist-xz dist-zip distcheck distclean distclean-generic \ 660 | distcleancheck distdir distuninstallcheck dvi dvi-am html \ 661 | html-am info info-am install install-am install-data \ 662 | install-data-am install-data-hook install-dist_binSCRIPTS \ 663 | install-dist_docDATA install-dvi install-dvi-am install-exec \ 664 | install-exec-am install-html install-html-am install-info \ 665 | install-info-am install-man install-man1 \ 666 | install-nobase_dist_pkgdataDATA install-pdf install-pdf-am \ 667 | install-ps install-ps-am install-strip installcheck \ 668 | installcheck-am installdirs maintainer-clean \ 669 | maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ 670 | pdf-am ps ps-am uninstall uninstall-am \ 671 | uninstall-dist_binSCRIPTS uninstall-dist_docDATA uninstall-man \ 672 | uninstall-man1 uninstall-nobase_dist_pkgdataDATA 673 | 674 | 675 | # bash completion script into $(sysconfdir)/bash_completion.d/ 676 | # most unix implementations do not set the executable permission 677 | # so well ship it as a data file. Its a bit wonky to have 678 | # $(prefix)/bin/rerun and $(prefix)/etc/bash_completion.d/rerun 679 | # being the same target name so I'll use a install hook 680 | 681 | install-data-hook: 682 | mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d 683 | cp -p $(srcdir)/bash_completion.sh \ 684 | $(DESTDIR)$(sysconfdir)/bash_completion.d/$(PACKAGE) 685 | 686 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 687 | # Otherwise a system limit (for SysV at least) may be exceeded. 688 | .NOEXPORT: 689 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | 2 | NEWS for rerun 3 | 4 | 0.1: Sep 21, 2011: 5 | - General new project hacking 6 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Rerun is an Apache 2 or later licensed utility. Many files distributed in 2 | the rerun distribution are generated by autoconf which are GPL v3 or later. 3 | These GPL files are a dependency on the build system and are independent 4 | works. 5 | 6 | Since this is a github project and an autoconf project, the 7 | README file is not used, README.md is the file to READ! 8 | 9 | http://ubuntuincident.wordpress.com/2011/05/05/readme-markdown-on-github/ 10 | 11 | When you checkout the file, run "setup.sh" which gets autoconf initialized. 12 | Then follow the instructions in INSTALL. Real standard stuff... 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NAME 2 | 3 | rerun - a simple command runner because it's easy to forget 4 | standard operating procedure. 5 | 6 | # SYNOPSYS 7 | 8 | rerun [-h][-v][-V] [-M ] [-L ] [--replay ] [module:[command [command_args]]] 9 | 10 | # DESCRIPTION 11 | 12 | Rerun is a lightweight tool building framework useful to those 13 | implementing management procedure with shell scripts. Rerun will help you 14 | organize your implementation into well defined modular interfaces. 15 | Collections of management modules can be archived and delivered as 16 | a single executable to facilitate team hand offs. 17 | Using the "stubbs" module, rerun will even facilitate unit tests. 18 | When users execute rerun module commands, rerun can record 19 | execution data into log files that can later be replayed. 20 | 21 | Rerun provides two interfaces: 22 | 23 | 1. *Listing*: Rerun lists modules and commands. Listing 24 | information includes name, description and command line usage syntax. 25 | 2. *Execution*: Rerun provides option processing (possibly defaulting 26 | unspecified arguments) and executes the specified module command. 27 | 28 | For the module developer, rerun is a trivial framework following 29 | simple conventions that easily fit in a shell environment. 30 | Rerun includes a module development tool called "stubbs" that 31 | helps create and evolve rerun modules. Stubbs contains 32 | commands to automate option processing code, metadata definition 33 | and unit testing. 34 | 35 | Internally, `rerun` implements a simple dispatching mechanism to look up named 36 | commands and execute them. *Commands* are logically named and 37 | have a corresponding script. 38 | 39 | Commands reside in a module and can have named 40 | parameters called *options*. Each option is named, 41 | described and can also be defined to use a default value 42 | or say whether it is required or not. 43 | 44 | Rerun modules can also declare metadata describing name, description 45 | and other aspects of each command. Rerun makes use of this metadata 46 | to support a listing mode, a feature where modules and command usage 47 | are summarized for end users. 48 | 49 | See the [project wiki](https://github.com/dtolabs/rerun/wiki) 50 | for additional documentation including: 51 | 52 | * [Getting started](https://github.com/dtolabs/rerun/wiki) 53 | * [Installation](https://github.com/dtolabs/rerun/wiki/Installation) 54 | * [Stubbs module tool](https://github.com/dtolabs/rerun/tree/master/modules/stubbs) 55 | * [Why rerun?](https://github.com/dtolabs/rerun/wiki/Why-rerun%3F) 56 | 57 | # OPTIONS 58 | 59 | `-h` 60 | : Print help and usage then exit. 61 | 62 | `--replay *LOG*` 63 | : Compare the results of an execution to those of a replay log and show the diff. 64 | 65 | `-M` *DIRECTORY* 66 | : Module library directory path. 67 | 68 | `-L` *DIRECTORY* 69 | : Log directory path. 70 | 71 | `-v` 72 | : Execute command in verbose mode. 73 | 74 | `-V` 75 | : Execute command and rerun in verbose mode. 76 | 77 | 78 | # USING 79 | 80 | ## Help 81 | 82 | For syntax and example usage execute `rerun` using the `--help` flag: 83 | 84 | $ ./rerun --help 85 | _ __ ___ _ __ _ _ _ __ 86 | | '__/ _ \ '__| | | | '_ \ 87 | | | | __/ | | |_| | | | | 88 | |_| \___|_| \__,_|_| |_| 89 | Version: v0.1. License: Apache 2.0. 90 | 91 | Usage: rerun [-h][-v][-V] [-M ] [-L ] [--replay ] [module:[command [command_args]]] 92 | 93 | Examples: 94 | | $ rerun 95 | | => List all modules. 96 | | $ rerun freddy 97 | | => List all freddy commands. 98 | | $ rerun freddy:dance --jumps 3 99 | | => Execute the freddy:dance command. 100 | | $ rerun -M /var/rerun freddy:dance 101 | | => Execute the freddy:dance command found in /var/rerun 102 | 103 | 104 | ## Listing 105 | 106 | Without arguments, `rerun` will list existing modules: 107 | 108 | $ rerun 109 | [modules] 110 | freddy: "A dancer in a red beret and matching suspenders" 111 | 112 | To list the commands available from the 'freddy' module run: 113 | 114 | $ rerun freddy 115 | [commands] 116 | study: "tell freddy to study" 117 | [options] 118 | --subject : "the summer school subject" 119 | dance: "tell freddy to dance" 120 | [options] 121 | --jumps <1>: "jump #num times" 122 | 123 | The listing consists of info about command options 124 | including default values if they were described with option metadata. 125 | 126 | Options that declare a default value are shown 127 | with a string between the "<>" characters. 128 | 129 | For example, notice how "--jumps" option shows `<1>`. 130 | The "1" is the default value assigned to the "--jumps" option. 131 | 132 | See the "Environment" section below to learn about the 133 | `RERUN_MODULES` environment variable. This variable 134 | specifies the directory where rerun modules exist. 135 | 136 | ### Bash completion 137 | 138 | If you are a Bash shell user, be sure to source the `bash_completion.sh` file. 139 | It provides listing via the tab key. 140 | 141 | Type `rerun` and then the tab key. The shell will generate 142 | a list of existing modules. 143 | 144 | $ rerun[TAB][TAB] 145 | freddy 146 | 147 | Rerun shows there is a module named "freddy" installed. 148 | 149 | Typing the tab key again will show the commands inside the "freddy" module: 150 | 151 | $ rerun freddy: [TAB] 152 | dance study 153 | 154 | In this case, two commands are found and listed. Press tab again 155 | and choose a command. 156 | After accepting a command, typing the tab key will show arguments. 157 | 158 | $ rerun freddy:study -[TAB] 159 | --subject 160 | 161 | The `freddy:study` command accepts one option (--subject <>). 162 | 163 | ## Executing 164 | 165 | Commands are executed by supplying the module, 166 | command and possibly options. The basic usage form is 167 | "module:command [args]". 168 | 169 | To run freddy module's "study" command, type: 170 | 171 | $ rerun freddy:study 172 | studying (math) 173 | 174 | The string "studying (math)" is the printed result. 175 | And, "math" is the subject option's default value 176 | as defined in the module metadata. 177 | 178 | Arguments are passed after the "module:command" string. 179 | Tell freddy to study the subject, "biology": 180 | 181 | $ rerun freddy:study --subject biology 182 | studying (biology) 183 | 184 | If the 'freddy' module is stored in `/var/rerun`, then the command usage 185 | should be: 186 | 187 | $ rerun -M /var/rerun freddy:study 188 | studying (math) 189 | 190 | ### Archives 191 | 192 | An *archive* contains all the rerun modules you need 193 | (you might have a library of them) and gives you 194 | the same exact interface as rerun,... all in one file! 195 | 196 | Specifically, an archive is a set of modules 197 | and `rerun` itself packaged into a self extracting 198 | script (by default "rerun.bin"). 199 | Archives can be useful if you want 200 | to share a single self contained executable that contains any needed modules. 201 | 202 | Run an archive script like you would run `rerun`. 203 | 204 | You can execute an archive via `bash` like so: 205 | 206 | $ bash rerun.bin : --your options 207 | 208 | If the execute bit is set, invoke the archive directly. 209 | 210 | Here the archive is executed without arguments which causes the archive 211 | to list the modules contained within it. 212 | 213 | $ ./rerun.bin 214 | [modules] 215 | freddy: "A dancer in a red beret and matching suspenders" 216 | . 217 | . listing output ommitted 218 | 219 | Note, ".bin" is just a suffix naming convention for a bash self-extracting script. 220 | The file can be named anything you wish. 221 | 222 | Run the `freddy:dance` command in the archive: 223 | 224 | $ bash ./rerun.bin freddy:dance --jumps 3 225 | jumps (3) 226 | 227 | See `stubbs:archive` for further information about creating and 228 | understanding rerun archives. 229 | 230 | ### Replay 231 | 232 | Rerun supports basic command replay logging (See "Logs" section below). 233 | When rerun logs a command it does so in a form that can be re-executed 234 | (i.e., "replayed"). It's possible to have rerun compare the results of a 235 | given replay log against a new command execution. 236 | 237 | Use the `--replay ` option to compare replay output from a command log. 238 | Replay logs are normally found in the directory specified by the `RERUN_LOGS` 239 | environment variable (or the `-L ` option). 240 | 241 | Below you can see the results of a comparison between this run of 242 | `freddy:dance --jumps 2` against an earlier command execution. 243 | After the command completes, rerun uses the `diff` command 244 | to compare the log output. 245 | 246 | $ ./rerun --replay $RERUN_LOGS/freddy-dance-2011-09-21T140744.replay freddy:dance --jumps 2 247 | jumps (2) 248 | [diff] 249 | 2c2 250 | < jumps () 251 | --- 252 | > jumps (2) 253 | 254 | In this case, the replay contained "jumps ()" while the new 255 | execution printed "jumps (2)". 256 | When a difference is detected, `rerun` will print the differences 257 | below the `[diff]` label and exit with a non-zero exit status. 258 | 259 | # LOGS 260 | 261 | Rerun logs all command execution, if the `-L ` 262 | argument is set or the `RERUN_LOGS` environment variable is set. 263 | Be sure to set `RERUN_LOGS` to a writable directory. 264 | 265 | Each command execution is stored in the form of a "replay" log 266 | file (ending with `.replay`). 267 | This log file contains information about the command 268 | execution, as well as, the output from the execution. 269 | 270 | These .replay files can be edited or executed as scripts. 271 | 272 | *File naming* 273 | 274 | Each replay log is named using the following pattern: 275 | 276 | $RERUN_LOGS/$MODULE-$COMMAND-YYYY-MM-DD-THHMMSS.replay 277 | 278 | To list the replay logs for the `freddy:dance` command use `ls`: 279 | 280 | $ ls -l $RERUN_LOGS/freddy-dance*.replay 281 | -rw-rw---- 1 alexh wheel 188 Sep 21 19:54 freddy-dance-2011-09-21T195402.replay 282 | 283 | 284 | *File format* 285 | 286 | Replay logs follow a simple format that combines 287 | command execution metadata and log output. 288 | 289 | metadata: 290 | 291 | * RERUN: The rerun executable 292 | * MODULE: The module name 293 | * COMMAND: The command name 294 | * OPTIONS: The command options 295 | * USER: The user executing the command 296 | * DATE: The timestamp for the execution 297 | 298 | Here's the metadata as specified in the file template: 299 | 300 | # 301 | # Rerun replay log 302 | # 303 | RERUN="$RERUN" 304 | MODULE="$MODULE" 305 | COMMAND="$COMMAND" 306 | OPTIONS="$*" 307 | USER="$USER" 308 | DATE="$(date '+%Y-%m%d-%H%M%S')" 309 | __LOG_BELOW__ 310 | 311 | Any command output is stored below the line delimiter, `__LOG_BELOW__`. 312 | 313 | Here's an example replay file for the `freddy:dance` command: 314 | 315 | # 316 | # Rerun replay log 317 | # 318 | RERUN="/Users/alexh/rerun-workspace/rerun/rerun" 319 | MODULE="freddy" 320 | COMMAND="dance" 321 | OPTIONS="" 322 | USER="alexh" 323 | DATE="2011-0921-195402" 324 | __LOG_BELOW__ 325 | 326 | jumps (1) 327 | 328 | This simple shell function will parse the content for a given 329 | replay log: 330 | 331 | rerun_extractLog() { 332 | [ -f $1 ] || die "file does not exist: $1" 333 | SIZE=$(awk '/^__LOG_BELOW__/ {print NR + 1; exit 0; }' $1) || die "failed sizing output" 334 | tail -n+$SIZE $1 || die "failed extracting output" 335 | } 336 | 337 | Running this shell function for a given replay log looks similar to this: 338 | 339 | $ rerun_extractLog $RERUN_LOGS/freddy-dance-2011-0921-194512.replay 340 | 341 | jumps (1) 342 | 343 | 344 | # MODULES 345 | 346 | ## Layout 347 | 348 | A rerun module assumes the following structure: 349 | 350 | 351 | ├── commands 352 | │   ├── cmdA (directory for cmdA files) 353 | │   │   ├── metadata (command metadata) 354 | │   │   ├── default.sh (generic script) 355 | │   │   ├── optX.option (declares metadata for "optX" option) 356 | │   │   └── options.sh (option parsing script) 357 | │   └── cmdB 358 | │   ├── Darwin.sh (OS specific script) 359 | │   ├── metadata 360 | │   ├── default.sh (generic script) 361 | │   ├── options.sh 362 | │   └── optY.option (declares metadata for "optY" option) 363 | ├── metadata (module metadata) 364 | └── lib 365 | 366 | ## Scripts 367 | 368 | Rerun's internal dispatch logic uses the layout convention 369 | described above to find and execute scripts for each command. 370 | 371 | Rerun expects a default implementation script for each command 372 | but can also invoke an OS specific script, if present. 373 | 374 | * default.sh: Generic implementation. 375 | * `uname -s`.sh: OS specific implementation 376 | * options.sh: Script sourceable by default and OS specific scripts 377 | to parse options. 378 | 379 | ## Metadata 380 | 381 | The metadata file format uses line separated KEY=value 382 | pairs to define module attributes. 383 | 384 | * NAME: Declare name displayed to user. 385 | * DESCRIPTION: Brief explanation of use. 386 | 387 | For example, a module named `freddy` and can be named 388 | and described as such in a file called `MODULE_DIR/metadata`: 389 | 390 | NAME="freddy" 391 | DESCRIPTION="A dancer in a red beret and matching suspenders" 392 | 393 | Command metadata are described in a file called 394 | `MODULE_DIR/commands//metadata`. 395 | Here's one for the "study" command: 396 | 397 | NAME="study" 398 | DESCRIPTION="tell freddy to study" 399 | 400 | Options can be described in a file called 401 | `MODULE_DIR/commands//