Skip to content

Commit b232968

Browse files
committed
Update all scripts to use advanced usage->exit.
``` exit ${1:-0} # Exit with code 0 unless an arg is passed to the method. ```
1 parent 1585727 commit b232968

18 files changed

Lines changed: 26 additions & 26 deletions

cache-clear

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Usage:
1919
2020
EOT
2121

22-
exit 0
22+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
2323
}
2424
if [ "$1" = '-h' ]; then
2525
usage

codesniffer-run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Usage:
2020
2121
EOT
2222

23-
exit $1
23+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
2424
}
2525

2626

composer-install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ${0##*/}
1111
the presence or absence of a composer.json file. Can be safely
1212
called even if these items are missing (with the result being
1313
essentially a no-op and >0 exit code.)
14-
14+
1515
There is a certain amount of irony in this script being
1616
included in a composer package, since you would have had to
1717
already run 'composer install' in order to have access to this
@@ -26,7 +26,7 @@ Usage:
2626
2727
EOT
2828

29-
exit 0
29+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
3030
}
3131
if [ "$1" = '-h' ]; then
3232
usage

db-login

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Usage:
1717
1818
EOT
1919

20-
exit 0
20+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
2121
}
2222
if [ "$1" = '-h' ]; then
2323
usage

db-sample-data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Usage:
1919
2020
EOT
2121

22-
exit 0
22+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
2323
}
2424
if [ "$1" = '-h' ]; then
2525
usage

docs-generate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Usage:
1717
1818
EOT
1919

20-
exit 0
20+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
2121
}
2222
if [ "$1" = '-h' ]; then
2323
usage

email

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Usage:
1919
2020
EOT
2121

22-
exit 0
22+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
2323
}
2424
if [ "$1" = '-h' ]; then
2525
usage

git-currentbranch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Environment Variables:
2121
2222
EOT
2323

24-
exit 0
24+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
2525
}
2626
if [ "$1" = '-h' ]; then
2727
usage

git-hook-workingcopychange

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Environment Variables:
3434
3535
EOT
3636

37-
exit 0
37+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
3838
}
3939
if [ "$1" = '-h' ]; then
4040
usage

git-localchanges

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Usage:
1717
1818
EOT
1919

20-
exit 0
20+
exit ${1:-0} # Exit with code 0 unless an arg is passed to the method.
2121
}
2222
if [ "$1" = '-h' ]; then
2323
usage

0 commit comments

Comments
 (0)