|
6 | 6 | # autorevision - extracts metadata about the head version from your repository. |
7 | 7 |
|
8 | 8 | # Usage message. |
9 | | -function arUsage { |
| 9 | +arUsage() { |
10 | 10 | cat > "/dev/stderr" << EOF |
11 | 11 | usage: ./autorevision {-t output-type | -s symbol} [-o cache-file [-f] ] [-V] |
12 | 12 | Options include: |
|
89 | 89 |
|
90 | 90 | # Functions to extract data from different repo types. |
91 | 91 | # For git repos |
92 | | -function gitRepo { |
| 92 | +gitRepo() { |
93 | 93 | cd "$(git rev-parse --show-toplevel)" |
94 | 94 |
|
95 | 95 | VCS_TYPE="git" |
@@ -134,7 +134,7 @@ function gitRepo { |
134 | 134 | } |
135 | 135 |
|
136 | 136 | # For hg repos |
137 | | -function hgRepo { |
| 137 | +hgRepo() { |
138 | 138 | cd "$(hg root)" |
139 | 139 |
|
140 | 140 | VCS_TYPE="hg" |
@@ -177,7 +177,7 @@ function hgRepo { |
177 | 177 | } |
178 | 178 |
|
179 | 179 | # For bzr repos |
180 | | -function bzrRepo { |
| 180 | +bzrRepo() { |
181 | 181 | cd "$(bzr root)" |
182 | 182 |
|
183 | 183 | VCS_TYPE="bzr" |
@@ -291,7 +291,7 @@ function svnRepo { |
291 | 291 |
|
292 | 292 | # Functions to output data in different formats. |
293 | 293 | # For header output |
294 | | -function hOutput { |
| 294 | +hOutput() { |
295 | 295 | cat > "${TARGETFILE}" << EOF |
296 | 296 | /* Generated by autorevision - do not hand-hack! */ |
297 | 297 | #ifndef AUTOREVISION_H |
|
317 | 317 | } |
318 | 318 |
|
319 | 319 | # A header output for use with xcode to populate info.plist strings |
320 | | -function xcodeOutput { |
| 320 | +xcodeOutput() { |
321 | 321 | cat > "${TARGETFILE}" << EOF |
322 | 322 | /* Generated by autorevision - do not hand-hack! */ |
323 | 323 | #ifndef AUTOREVISION_H |
|
343 | 343 | } |
344 | 344 |
|
345 | 345 | # For bash output |
346 | | -function shOutput { |
| 346 | +shOutput() { |
347 | 347 | cat > "${TARGETFILE}" << EOF |
348 | 348 | # Generated by autorevision - do not hand-hack! |
349 | 349 |
|
|
365 | 365 | } |
366 | 366 |
|
367 | 367 | # For Python output |
368 | | -function pyOutput { |
| 368 | +pyOutput() { |
369 | 369 | case "${VCS_WC_MODIFIED}" in |
370 | 370 | 0) VCS_WC_MODIFIED="False" ;; |
371 | 371 | 1) VCS_WC_MODIFIED="True" ;; |
|
391 | 391 | } |
392 | 392 |
|
393 | 393 | # For Perl output |
394 | | -function plOutput { |
| 394 | +plOutput() { |
395 | 395 | cat << EOF |
396 | 396 | # Generated by autorevision - do not hand-hack! |
397 | 397 |
|
|
413 | 413 | } |
414 | 414 |
|
415 | 415 | # For lua output |
416 | | -function luaOutput { |
| 416 | +luaOutput() { |
417 | 417 | case "${VCS_WC_MODIFIED}" in |
418 | 418 | 0) VCS_WC_MODIFIED="false" ;; |
419 | 419 | 1) VCS_WC_MODIFIED="true" ;; |
|
439 | 439 | } |
440 | 440 |
|
441 | 441 | # For php output |
442 | | -function phpOutput { |
| 442 | +phpOutput() { |
443 | 443 | case "${VCS_WC_MODIFIED}" in |
444 | 444 | 0) VCS_WC_MODIFIED="false" ;; |
445 | 445 | 1) VCS_WC_MODIFIED="true" ;; |
|
467 | 467 | } |
468 | 468 |
|
469 | 469 | # For ini output |
470 | | -function iniOutput { |
| 470 | +iniOutput() { |
471 | 471 | case "${VCS_WC_MODIFIED}" in |
472 | 472 | 0) VCS_WC_MODIFIED="false" ;; |
473 | 473 | 1) VCS_WC_MODIFIED="true" ;; |
|
490 | 490 | } |
491 | 491 |
|
492 | 492 | # For javascript output |
493 | | -function jsOutput { |
| 493 | +jsOutput() { |
494 | 494 | case "${VCS_WC_MODIFIED}" in |
495 | 495 | 1) VCS_WC_MODIFIED="true" ;; |
496 | 496 | 0) VCS_WC_MODIFIED="false" ;; |
|
523 | 523 | } |
524 | 524 |
|
525 | 525 | # For Java output |
526 | | -function javaOutput { |
| 526 | +javaOutput() { |
527 | 527 | case "${VCS_WC_MODIFIED}" in |
528 | 528 | 1) VCS_WC_MODIFIED="true" ;; |
529 | 529 | 0) VCS_WC_MODIFIED="false" ;; |
|
551 | 551 | } |
552 | 552 |
|
553 | 553 | # For Java properties output |
554 | | -function javapropOutput { |
| 554 | +javapropOutput() { |
555 | 555 | case "${VCS_WC_MODIFIED}" in |
556 | 556 | 1) VCS_WC_MODIFIED="true" ;; |
557 | 557 | 0) VCS_WC_MODIFIED="false" ;; |
|
575 | 575 | } |
576 | 576 |
|
577 | 577 | # For (La)TeX output |
578 | | -function texOutput { |
| 578 | +texOutput() { |
579 | 579 | case "${VCS_WC_MODIFIED}" in |
580 | 580 | 0) VCS_WC_MODIFIED="false" ;; |
581 | 581 | 1) VCS_WC_MODIFIED="true" ;; |
|
0 commit comments