diff options
author | 2012-03-28 18:46:29 +0000 | |
---|---|---|
committer | 2012-03-28 18:46:29 +0000 | |
commit | c4b39c391c34ec8ca71da0ed93cadd281b562dd3 (patch) | |
tree | 299f6c651fabdb8c89123d99822abddc79414343 | |
parent | add quotes to path vars to be consistent, and to be defensive in case of spac... (diff) | |
download | build-docbook-catalog-c4b39c391c34ec8ca71da0ed93cadd281b562dd3.tar.gz build-docbook-catalog-c4b39c391c34ec8ca71da0ed93cadd281b562dd3.tar.bz2 build-docbook-catalog-c4b39c391c34ec8ca71da0ed93cadd281b562dd3.zip |
be consistent in variable style: ${foo} rather than $foo
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-x | build-docbook-catalog | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/build-docbook-catalog b/build-docbook-catalog index b4ca280..8e34f15 100755 --- a/build-docbook-catalog +++ b/build-docbook-catalog @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /usr/local/src/gentoo/gentoo-src/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.15 2012/03/27 22:54:41 vapier Exp $ +# $Header: /usr/local/src/gentoo/gentoo-src/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.16 2012/03/28 18:46:29 vapier Exp $ # # build-docbook-catalog: populate /etc/xml/docbook based in # installed docbook-xml-dtd versions. @@ -40,10 +40,10 @@ usage() { main() { local d v opts - opts=$(getopt -o hv --long help,verbose -n "$ZERO" -- "$@") || exit 1 - eval set -- "$opts" + opts=$(getopt -o hv --long help,verbose -n "${ZERO}" -- "$@") || exit 1 + eval set -- "${opts}" while true; do - case "$1" in + case $1 in -h|--help) usage ;; -v|--verbose) VERBOSE=true ;; --) break ;; @@ -54,7 +54,7 @@ main() { create_catalogs # will exit on error for type in xsl xsl-ns xsl-saxon xsl-xalan; do - populate_xsl $type + populate_xsl ${type} done # Clean out old dtds from catalog @@ -79,7 +79,7 @@ main() { # verbose echo -- only echo if called with --verbose # verb() { - $VERBOSE && echo "$*" + ${VERBOSE} && echo "$*" } # @@ -233,8 +233,8 @@ populate_dtd() { return 0 fi verb " RCS datestamp in ${dtd} is ${dtd_date}" - dtd_date=$(date -d "$dtd_date" +%s) - if [[ -z $LATEST_DTD || $dtd_date -gt $LATEST_DATE ]]; then + dtd_date=$(date -d "${dtd_date}" +%s) + if [[ ${dtd_date} -gt ${LATEST_DATE:-0} ]] ; then LATEST_DATE=${dtd_date} LATEST_DTD=${dtd} fi |