Skip to content

Commit 29e4ab1

Browse files
committed
Use POSIX function definitions
1 parent 0f461d5 commit 29e4ab1

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

autorevision

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# autorevision - extracts metadata about the head version from your repository.
77

88
# Usage message.
9-
function arUsage {
9+
arUsage() {
1010
cat > "/dev/stderr" << EOF
1111
usage: ./autorevision {-t output-type | -s symbol} [-o cache-file [-f] ] [-V]
1212
Options include:
@@ -89,7 +89,7 @@ fi
8989

9090
# Functions to extract data from different repo types.
9191
# For git repos
92-
function gitRepo {
92+
gitRepo() {
9393
cd "$(git rev-parse --show-toplevel)"
9494

9595
VCS_TYPE="git"
@@ -134,7 +134,7 @@ function gitRepo {
134134
}
135135

136136
# For hg repos
137-
function hgRepo {
137+
hgRepo() {
138138
cd "$(hg root)"
139139

140140
VCS_TYPE="hg"
@@ -177,7 +177,7 @@ function hgRepo {
177177
}
178178

179179
# For bzr repos
180-
function bzrRepo {
180+
bzrRepo() {
181181
cd "$(bzr root)"
182182

183183
VCS_TYPE="bzr"
@@ -291,7 +291,7 @@ function svnRepo {
291291

292292
# Functions to output data in different formats.
293293
# For header output
294-
function hOutput {
294+
hOutput() {
295295
cat > "${TARGETFILE}" << EOF
296296
/* Generated by autorevision - do not hand-hack! */
297297
#ifndef AUTOREVISION_H
@@ -317,7 +317,7 @@ EOF
317317
}
318318

319319
# A header output for use with xcode to populate info.plist strings
320-
function xcodeOutput {
320+
xcodeOutput() {
321321
cat > "${TARGETFILE}" << EOF
322322
/* Generated by autorevision - do not hand-hack! */
323323
#ifndef AUTOREVISION_H
@@ -343,7 +343,7 @@ EOF
343343
}
344344

345345
# For bash output
346-
function shOutput {
346+
shOutput() {
347347
cat > "${TARGETFILE}" << EOF
348348
# Generated by autorevision - do not hand-hack!
349349
@@ -365,7 +365,7 @@ EOF
365365
}
366366

367367
# For Python output
368-
function pyOutput {
368+
pyOutput() {
369369
case "${VCS_WC_MODIFIED}" in
370370
0) VCS_WC_MODIFIED="False" ;;
371371
1) VCS_WC_MODIFIED="True" ;;
@@ -391,7 +391,7 @@ EOF
391391
}
392392

393393
# For Perl output
394-
function plOutput {
394+
plOutput() {
395395
cat << EOF
396396
# Generated by autorevision - do not hand-hack!
397397
@@ -413,7 +413,7 @@ EOF
413413
}
414414

415415
# For lua output
416-
function luaOutput {
416+
luaOutput() {
417417
case "${VCS_WC_MODIFIED}" in
418418
0) VCS_WC_MODIFIED="false" ;;
419419
1) VCS_WC_MODIFIED="true" ;;
@@ -439,7 +439,7 @@ EOF
439439
}
440440

441441
# For php output
442-
function phpOutput {
442+
phpOutput() {
443443
case "${VCS_WC_MODIFIED}" in
444444
0) VCS_WC_MODIFIED="false" ;;
445445
1) VCS_WC_MODIFIED="true" ;;
@@ -467,7 +467,7 @@ EOF
467467
}
468468

469469
# For ini output
470-
function iniOutput {
470+
iniOutput() {
471471
case "${VCS_WC_MODIFIED}" in
472472
0) VCS_WC_MODIFIED="false" ;;
473473
1) VCS_WC_MODIFIED="true" ;;
@@ -490,7 +490,7 @@ EOF
490490
}
491491

492492
# For javascript output
493-
function jsOutput {
493+
jsOutput() {
494494
case "${VCS_WC_MODIFIED}" in
495495
1) VCS_WC_MODIFIED="true" ;;
496496
0) VCS_WC_MODIFIED="false" ;;
@@ -523,7 +523,7 @@ EOF
523523
}
524524

525525
# For Java output
526-
function javaOutput {
526+
javaOutput() {
527527
case "${VCS_WC_MODIFIED}" in
528528
1) VCS_WC_MODIFIED="true" ;;
529529
0) VCS_WC_MODIFIED="false" ;;
@@ -551,7 +551,7 @@ EOF
551551
}
552552

553553
# For Java properties output
554-
function javapropOutput {
554+
javapropOutput() {
555555
case "${VCS_WC_MODIFIED}" in
556556
1) VCS_WC_MODIFIED="true" ;;
557557
0) VCS_WC_MODIFIED="false" ;;
@@ -575,7 +575,7 @@ EOF
575575
}
576576

577577
# For (La)TeX output
578-
function texOutput {
578+
texOutput() {
579579
case "${VCS_WC_MODIFIED}" in
580580
0) VCS_WC_MODIFIED="false" ;;
581581
1) VCS_WC_MODIFIED="true" ;;

0 commit comments

Comments
 (0)