diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2013-12-23 06:44:48 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2013-12-23 06:44:48 +0800 |
commit | 9457c9a5c9a7e72f578cecdd8aa14c6615026cf2 (patch) | |
tree | 5b0b45aaa8d8cc065df3e6a9a7e0d7a1650ce762 /games/warzone2100 | |
parent | ee7deba07166f454b9995fc6dfc87c20f612def7 (diff) | |
download | freebsd-ports-gnome-9457c9a5c9a7e72f578cecdd8aa14c6615026cf2.tar.gz freebsd-ports-gnome-9457c9a5c9a7e72f578cecdd8aa14c6615026cf2.tar.zst freebsd-ports-gnome-9457c9a5c9a7e72f578cecdd8aa14c6615026cf2.zip |
- Fix build, fix typo in MANPAGES option
Diffstat (limited to 'games/warzone2100')
-rw-r--r-- | games/warzone2100/Makefile | 2 | ||||
-rw-r--r-- | games/warzone2100/files/patch-build__tools-autorevision | 601 |
2 files changed, 1 insertions, 602 deletions
diff --git a/games/warzone2100/Makefile b/games/warzone2100/Makefile index 77a75bf3640a..2e8a40da3a54 100644 --- a/games/warzone2100/Makefile +++ b/games/warzone2100/Makefile @@ -43,7 +43,7 @@ PORTDOCS= * PORTDATA= * OPTIONS_DEFINE= DOCS NLS MANPAGES -OPTIONS_DEFAULT=MANPLAGES +OPTIONS_DEFAULT=MANPAGES OPTIONS_SUB= yes NLS_USES= gettext diff --git a/games/warzone2100/files/patch-build__tools-autorevision b/games/warzone2100/files/patch-build__tools-autorevision deleted file mode 100644 index 7c5cf22b5b54..000000000000 --- a/games/warzone2100/files/patch-build__tools-autorevision +++ /dev/null @@ -1,601 +0,0 @@ ---- build_tools/autorevision.orig 2013-01-15 03:54:06.000000000 +0400 -+++ build_tools/autorevision 2013-11-28 22:51:48.683986977 +0400 -@@ -1,12 +1,14 @@ --#!/bin/bash -+#!/bin/sh - --# Copyright (c) 2012 dak180 --# See http://opensource.org/licenses/bsd-license.php for licence terms -+# Copyright (c) 2012 - 2013 dak180 and contributors. See -+# http://opensource.org/licenses/mit-license.php or the included -+# COPYING.md for licence terms. - # --# autorevision - extracts metadata about the head version from your repository. -+# autorevision - extracts metadata about the head version from your -+# repository. - - # Usage message. --function arUsage { -+arUsage() { - cat > "/dev/stderr" << EOF - usage: ./autorevision {-t output-type | -s symbol} [-o cache-file [-f] ] [-V] - Options include: -@@ -14,6 +16,7 @@ - -s symbol = specify symbol output - -o cache-file = specify cache file location - -f = force the use of cache data -+ -U = check for untracked files in svn - -V = emit version and exit - -? = help message - -@@ -27,8 +30,11 @@ - php = PHP file - ini = INI file - js = javascript file -+ json = JSON file - java = Java file - javaprop = Java properties file -+ tex = (La)TeX file -+ m4 = m4 file - - The following are valid symbols: - VCS_TYPE -@@ -46,9 +52,9 @@ - } - - # Config --ARVERSION="1.1" -+ARVERSION="&&ARVERSION&&" - TARGETFILE="/dev/stdout" --while getopts ":t:o:s:Vf" OPTION; do -+while getopts ":t:o:s:VfU" OPTION; do - case "${OPTION}" in - t) - AFILETYPE="${OPTARG}" -@@ -62,6 +68,9 @@ - s) - VAROUT="${OPTARG}" - ;; -+ U) -+ UNTRACKEDFILES="1" -+ ;; - V) - echo "autorevision ${ARVERSION}" - exit 0 -@@ -73,56 +82,70 @@ - esac - done - --if [[ ! -z "${VAROUT}" ]] && [[ ! -z "${AFILETYPE}" ]]; then -+if [ ! -z "${VAROUT}" ] && [ ! -z "${AFILETYPE}" ]; then - # If both -s and -t are specified: - echo "error: Improper argument combination." 1>&2 - exit 1 --elif [[ -z "${VAROUT}" ]] && [[ -z "${AFILETYPE}" ]]; then -+elif [ -z "${VAROUT}" ] && [ -z "${AFILETYPE}" ]; then - # If neither -s or -t are specified: - arUsage --elif [[ -z "${CACHEFILE}" ]] && [[ "${CACHEFORCE}" = "1" ]]; then -+elif [ -z "${CACHEFILE}" ] && [ "${CACHEFORCE}" = "1" ]; then - # If -f is specified without -o: - arUsage - fi - -+# Make sure that the path we are given is one we can source -+# (dash, we are looking at you). -+if [ ! -z "${CACHEFILE}" ] && ! echo "${CACHEFILE}" | grep -q '^\.*/'; then -+ CACHEFILE="./${CACHEFILE}" -+fi -+ - - # Functions to extract data from different repo types. - # For git repos --function gitRepo { -+gitRepo() { - cd "$(git rev-parse --show-toplevel)" - - VCS_TYPE="git" - - VCS_BASENAME="$(basename "${PWD}")" - -- # Is the working copy clean? -- git diff --quiet HEAD &> /dev/null -+ # Is the working copy clean? -+ test -z "$(git status --untracked-files=normal --porcelain)" - VCS_WC_MODIFIED="${?}" - - # Enumeration of changesets - VCS_NUM="$(git rev-list --count HEAD 2>/dev/null)" -- if [[ -z "${VCS_NUM}" ]]; then -+ if [ -z "${VCS_NUM}" ]; then - echo "warning: Counting the number of revisions may be slower due to an outdated git version less than 1.7.2.3. If something breaks, please update it." 1>&2 - VCS_NUM="$(git rev-list HEAD | wc -l)" - fi - -- # The full revision hash -- VCS_FULL_HASH="$(git rev-parse HEAD)" -+ # This may be a git-svn remote. If so, report the Subversion revision. -+ if [ -z "$(git config svn-remote.svn.url 2>/dev/null)" ] -+ then -+ # The full revision hash -+ VCS_FULL_HASH="$(git rev-parse HEAD)" - -- # The short hash -- VCS_SHORT_HASH="$(echo "${VCS_FULL_HASH}" | cut -b 1-7)" -+ # The short hash -+ VCS_SHORT_HASH="$(echo "${VCS_FULL_HASH}" | cut -b 1-7)" -+ else -+ # The git-svn revision number -+ VCS_FULL_HASH="$(git svn find-rev HEAD)" -+ VCS_SHORT_HASH="${VCS_FULL_HASH}" -+ fi - - # Current branch - VCS_BRANCH="$(git rev-parse --symbolic-full-name --verify "$(git name-rev --name-only --no-undefined HEAD 2>/dev/null)" 2>/dev/null | sed -e 's:refs/heads/::' | sed -e 's:refs/::')" - - # Cache the description -- DESCRIPTION="$(git describe --long --tags 2>/dev/null)" -+ local DESCRIPTION="$(git describe --long --tags 2>/dev/null)" - - # Current or last tag ancestor (empty if no tags) - VCS_TAG="$(echo "${DESCRIPTION}" | sed -e "s:-g${VCS_SHORT_HASH}\$::" | sed -e 's:-[0-9]*$::')" - - # Distance to last tag or an alias of VCS_NUM if there is no tag -- if [[ ! -z "${DESCRIPTION}" ]]; then -+ if [ ! -z "${DESCRIPTION}" ]; then - VCS_TICK="$(echo "${DESCRIPTION}" | sed -e "s:${VCS_TAG}-::" -e "s:-g${VCS_SHORT_HASH}::")" - else - VCS_TICK="${VCS_NUM}" -@@ -133,7 +156,7 @@ - } - - # For hg repos --function hgRepo { -+hgRepo() { - cd "$(hg root)" - - VCS_TYPE="hg" -@@ -141,7 +164,7 @@ - VCS_BASENAME="$(basename "${PWD}")" - - # Is the working copy clean? -- hg sum | grep -q 'commit: (clean)' -+ test -z "$(hg status -duram)" - VCS_WC_MODIFIED="${?}" - - # Enumeration of changesets -@@ -157,7 +180,7 @@ - # or branch if no bookmark - VCS_BRANCH="$(hg id -B | cut -d ' ' -f 1)" - # Fall back to the branch if there are no bookmarks -- if [[ -z "${VCS_BRANCH}" ]]; then -+ if [ -z "${VCS_BRANCH}" ]; then - VCS_BRANCH="$(hg id -b)" - fi - -@@ -165,7 +188,7 @@ - VCS_TAG="$(hg log -r "${VCS_NUM}" -l 1 --template '{latesttag}\n' 2>/dev/null | sed -e 's:qtip::' -e 's:tip::' -e 's:qbase::' -e 's:qparent::' -e "s:$(hg --config 'extensions.color=' --color never qtop 2>/dev/null)::" | cut -d ' ' -f 1)" - - # Distance to last tag or an alias of VCS_NUM if there is no tag -- if [[ ! -z "${VCS_TAG}" ]]; then -+ if [ ! -z "${VCS_TAG}" ]; then - VCS_TICK="$(hg log -r "${VCS_NUM}" -l 1 --template '{latesttagdistance}\n' 2>/dev/null)" - else - VCS_TICK="${VCS_NUM}" -@@ -176,7 +199,7 @@ - } - - # For bzr repos --function bzrRepo { -+bzrRepo() { - cd "$(bzr root)" - - VCS_TYPE="bzr" -@@ -194,7 +217,7 @@ - VCS_FULL_HASH="$(bzr version-info --custom --template='{revision_id}\n')" - - # The short hash -- VCS_SHORT_HASH="$VCS_NUM" -+ VCS_SHORT_HASH="${VCS_NUM}" - - # Nick of the current branch - VCS_BRANCH="$(bzr nick)" -@@ -203,7 +226,7 @@ - VCS_TAG="$(bzr tags --sort=time | sed '/?$/d' | tail -n1 | cut -d ' ' -f1)" - - # Distance to last tag or an alias of VCS_NUM if there is no tag -- if [[ ! -z "${VCS_TAG}" ]]; then -+ if [ ! -z "${VCS_TAG}" ]; then - VCS_TICK="$(bzr log --line -r "tag:${VCS_TAG}.." | tail -n +2 | wc -l | sed -e 's:^ *::')" - else - VCS_TICK="${VCS_NUM}" -@@ -214,17 +237,17 @@ - } - - # For svn repos --function svnRepo { -+svnRepo() { - VCS_TYPE="svn" - - case "${PWD}" in - /*trunk*|/*branches*|/*tags*) -- fn="${PWD}" -- while [[ "$(basename "${fn}")" != 'trunk' ]] && [[ "$(basename "${fn}")" != 'branches' ]] && [[ "$(basename "${fn}")" != 'tags' ]] && [[ "$(basename "${fn}")" != '/' ]]; do -- fn="$(dirname "${fn}")" -+ local fn="${PWD}" -+ while [ "$(basename "${fn}")" != 'trunk' ] && [ "$(basename "${fn}")" != 'branches' ] && [ "$(basename "${fn}")" != 'tags' ] && [ "$(basename "${fn}")" != '/' ]; do -+ local fn="$(dirname "${fn}")" - done - fn="$(dirname "${fn}")" -- if [[ "${fn}" == '/' ]]; then -+ if [ "${fn}" = '/' ]; then - VCS_BASENAME="$(basename "${PWD}")" - else - VCS_BASENAME="$(basename "${fn}")" -@@ -234,13 +257,24 @@ - esac - - # Cache svnversion output -- SVNVERSION="$(svnversion)" -+ local SVNVERSION="$(svnversion)" - - # Is the working copy clean? - echo "${SVNVERSION}" | grep -q "M" - case "${?}" in -- 0) VCS_WC_MODIFIED="1";; -- 1) VCS_WC_MODIFIED="0";; -+ 0) -+ VCS_WC_MODIFIED="1" -+ ;; -+ 1) -+ if [ ! -z "${UNTRACKEDFILES}"]; then -+ # `svnversion` does not detect untracked files and `svn status` is really slow, so only run it if we really have to. -+ if [ -z "$(svn status)" ]; then -+ VCS_WC_MODIFIED="0" -+ else -+ VCS_WC_MODIFIED="1" -+ fi -+ fi -+ ;; - esac - - # Enumeration of changesets -@@ -250,28 +284,28 @@ - VCS_FULL_HASH="${SVNVERSION}" - - # The short hash -- VCS_SHORT_HASH="$VCS_NUM" -+ VCS_SHORT_HASH="${VCS_NUM}" - - # Current branch - case "${PWD}" in - /*trunk*|/*branches*|/*tags*) -- lastbase="" -- fn="${PWD}" -+ local lastbase="" -+ loacl fn="${PWD}" - while : - do - base="$(basename "${fn}")" -- if [[ "$base" = 'trunk' ]]; then -+ if [ "${base}" = 'trunk' ]; then - VCS_BRANCH='trunk' - break -- elif [[ "${base}" = 'branches' ]] || [[ "${base}" = 'tags' ]]; then -+ elif [ "${base}" = 'branches' ] || [ "${base}" = 'tags' ]; then - VCS_BRANCH="${lastbase}" - break -- elif [[ "${base}" = '/' ]]; then -+ elif [ "${base}" = '/' ]; then - VCS_BRANCH="" - break - fi -- lastbase="${base}" -- fn="$(dirname "${fn}")" -+ local lastbase="${base}" -+ local fn="$(dirname "${fn}")" - done - ;; - *) VCS_BRANCH="" ;; -@@ -290,7 +324,7 @@ - - # Functions to output data in different formats. - # For header output --function hOutput { -+hOutput() { - cat > "${TARGETFILE}" << EOF - /* Generated by autorevision - do not hand-hack! */ - #ifndef AUTOREVISION_H -@@ -316,7 +350,7 @@ - } - - # A header output for use with xcode to populate info.plist strings --function xcodeOutput { -+xcodeOutput() { - cat > "${TARGETFILE}" << EOF - /* Generated by autorevision - do not hand-hack! */ - #ifndef AUTOREVISION_H -@@ -342,7 +376,7 @@ - } - - # For bash output --function shOutput { -+shOutput() { - cat > "${TARGETFILE}" << EOF - # Generated by autorevision - do not hand-hack! - -@@ -364,7 +398,7 @@ - } - - # For Python output --function pyOutput { -+pyOutput() { - case "${VCS_WC_MODIFIED}" in - 0) VCS_WC_MODIFIED="False" ;; - 1) VCS_WC_MODIFIED="True" ;; -@@ -390,7 +424,7 @@ - } - - # For Perl output --function plOutput { -+plOutput() { - cat << EOF - # Generated by autorevision - do not hand-hack! - -@@ -412,7 +446,7 @@ - } - - # For lua output --function luaOutput { -+luaOutput() { - case "${VCS_WC_MODIFIED}" in - 0) VCS_WC_MODIFIED="false" ;; - 1) VCS_WC_MODIFIED="true" ;; -@@ -438,7 +472,7 @@ - } - - # For php output --function phpOutput { -+phpOutput() { - case "${VCS_WC_MODIFIED}" in - 0) VCS_WC_MODIFIED="false" ;; - 1) VCS_WC_MODIFIED="true" ;; -@@ -466,7 +500,7 @@ - } - - # For ini output --function iniOutput { -+iniOutput() { - case "${VCS_WC_MODIFIED}" in - 0) VCS_WC_MODIFIED="false" ;; - 1) VCS_WC_MODIFIED="true" ;; -@@ -489,7 +523,7 @@ - } - - # For javascript output --function jsOutput { -+jsOutput() { - case "${VCS_WC_MODIFIED}" in - 1) VCS_WC_MODIFIED="true" ;; - 0) VCS_WC_MODIFIED="false" ;; -@@ -521,8 +555,32 @@ - EOF - } - -+# For JSON output -+jsonOutput() { -+ case "${VCS_WC_MODIFIED}" in -+ 1) VCS_WC_MODIFIED="true" ;; -+ 0) VCS_WC_MODIFIED="false" ;; -+ esac -+ cat > "${TARGETFILE}" << EOF -+{ -+ "VCS_TYPE": "${VCS_TYPE}", -+ "VCS_BASENAME": "${VCS_BASENAME}", -+ "VCS_NUM": ${VCS_NUM}, -+ "VCS_DATE": "${VCS_DATE}", -+ "VCS_BRANCH":"${VCS_BRANCH}", -+ "VCS_TAG": "${VCS_TAG}", -+ "VCS_TICK": ${VCS_TICK}, -+ -+ "VCS_FULL_HASH": "${VCS_FULL_HASH}", -+ "VCS_SHORT_HASH": "${VCS_SHORT_HASH}", -+ -+ "VCS_WC_MODIFIED": ${VCS_WC_MODIFIED} -+} -+EOF -+} -+ - # For Java output --function javaOutput { -+javaOutput() { - case "${VCS_WC_MODIFIED}" in - 1) VCS_WC_MODIFIED="true" ;; - 0) VCS_WC_MODIFIED="false" ;; -@@ -536,7 +594,7 @@ - public static final String VCS_TYPE = "${VCS_TYPE}"; - public static final String VCS_BASENAME = "${VCS_BASENAME}"; - public static final long VCS_NUM = ${VCS_NUM}; -- public static final Date VCS_DATE = new Date($(date -d ${VCS_DATE} +%s)); -+ public static final String VCS_DATE = "${VCS_DATE}"; - public static final String VCS_BRANCH = "${VCS_BRANCH}"; - public static final String VCS_TAG = "${VCS_TAG}"; - public static final long VCS_TICK = ${VCS_TICK}; -@@ -550,7 +608,7 @@ - } - - # For Java properties output --function javapropOutput { -+javapropOutput() { - case "${VCS_WC_MODIFIED}" in - 1) VCS_WC_MODIFIED="true" ;; - 0) VCS_WC_MODIFIED="false" ;; -@@ -573,22 +631,63 @@ - EOF - } - -+# For m4 output -+m4Output() { -+ cat > "${TARGETFILE}" << EOF -+define(\`VCS_TYPE', \`${VCS_TYPE}')dnl -+define(\`VCS_BASENAME', \`${VCS_BASENAME}')dnl -+define(\`VCS_NUM', \`${VCS_NUM}')dnl -+define(\`VCS_DATE', \`${VCS_DATE}')dnl -+define(\`VCS_BRANCH', \`${VCS_BRANCH}')dnl -+define(\`VCS_TAG', \`${VCS_TAG}')dnl -+define(\`VCS_TICK', \`${VCS_TICK}')dnl -+define(\`VCS_FULLHASH', \`${VCS_FULL_HASH}')dnl -+define(\`VCS_SHIRTHASH', \`${VCS_SHORT_HASH}')dnl -+define(\`VCS_WC_MODIFIED', \`${VCS_WC_MODIFIED}')dnl -+EOF -+} -+ -+# For (La)TeX output -+texOutput() { -+ case "${VCS_WC_MODIFIED}" in -+ 0) VCS_WC_MODIFIED="false" ;; -+ 1) VCS_WC_MODIFIED="true" ;; -+ esac -+ cat > "${TARGETFILE}" << EOF -+% Generated by autorevision - do not hand-hack! -+\def \vcsType {${VCS_TYPE}} -+\def \vcsBasename {${VCS_BASENAME}} -+\def \vcsNum {${VCS_NUM}} -+\def \vcsDate {${VCS_DATE}} -+\def \vcsBranch {${VCS_BRANCH}} -+\def \vcsTag {${VCS_TAG}} -+\def \vcsTick {${VCS_TICK}} -+\def \vcsFullHash {${VCS_FULL_HASH}} -+\def \vcsShortHash {${VCS_SHORT_HASH}} -+\def \vcsWCModified {${VCS_WC_MODIFIED}} -+\endinput -+EOF -+} -+ -+ - - # Detect and collect repo data. --if [[ -f "${CACHEFILE}" ]] && [[ "${CACHEFORCE}" = "1" ]]; then -+if [ -f "${CACHEFILE}" ] && [ "${CACHEFORCE}" = "1" ]; then - # When requested only read from the cache to populate our symbols. -- source "${CACHEFILE}" --elif [[ ! -z "$(git rev-parse HEAD 2>/dev/null)" ]]; then -+ . "${CACHEFILE}" -+elif [ ! -z "$(git rev-parse HEAD 2>/dev/null)" ]; then - gitRepo --elif [[ ! -z "$(hg root 2>/dev/null)" ]]; then -+elif [ ! -z "$(hg root 2>/dev/null)" ]; then - hgRepo --elif [[ ! -z "$(bzr root 2>/dev/null)" ]]; then -+elif [ ! -z "$(bzr root 2>/dev/null)" ]; then - bzrRepo --elif [[ ! -z "$(svn info 2>/dev/null)" ]]; then -+elif [ ! -z "$(svn info 2>/dev/null)" ]; then - svnRepo --elif [[ -f "${CACHEFILE}" ]]; then -+elif [ -f "${CACHEFILE}" ]; then - # We are not in a repo; try to use a previously generated cache to populate our symbols. -- source "${CACHEFILE}" -+ . "${CACHEFILE}" -+ # Do not overwrite the cache if we know we are not going to write anything new. -+ CACHEFORCE="1" - else - echo "error: No repo or cache detected." 1>&2 - exit 1 -@@ -596,55 +695,64 @@ - - - # -s output is handled here. --if [[ ! -z "${VAROUT}" ]]; then -- if [[ "${VAROUT}" = "VCS_TYPE" ]]; then -+if [ ! -z "${VAROUT}" ]; then -+ if [ "${VAROUT}" = "VCS_TYPE" ]; then - echo "${VCS_TYPE}" -- elif [[ "${VAROUT}" = "VCS_BASENAME" ]]; then -+ elif [ "${VAROUT}" = "VCS_BASENAME" ]; then - echo "${VCS_BASENAME}" -- elif [[ "${VAROUT}" = "VCS_NUM" ]]; then -+ elif [ "${VAROUT}" = "VCS_NUM" ]; then - echo "${VCS_NUM}" -- elif [[ "${VAROUT}" = "VCS_DATE" ]]; then -+ elif [ "${VAROUT}" = "VCS_DATE" ]; then - echo "${VCS_DATE}" -- elif [[ "${VAROUT}" = "VCS_BRANCH" ]]; then -+ elif [ "${VAROUT}" = "VCS_BRANCH" ]; then - echo "${VCS_BRANCH}" -- elif [[ "${VAROUT}" = "VCS_TAG" ]]; then -+ elif [ "${VAROUT}" = "VCS_TAG" ]; then - echo "${VCS_TAG}" -- elif [[ "${VAROUT}" = "VCS_TICK" ]]; then -+ elif [ "${VAROUT}" = "VCS_TICK" ]; then - echo "${VCS_TICK}" -- elif [[ "${VAROUT}" = "VCS_FULL_HASH" ]]; then -+ elif [ "${VAROUT}" = "VCS_FULL_HASH" ]; then - echo "${VCS_FULL_HASH}" -- elif [[ "${VAROUT}" = "VCS_SHORT_HASH" ]]; then -+ elif [ "${VAROUT}" = "VCS_SHORT_HASH" ]; then - echo "${VCS_SHORT_HASH}" -- elif [[ "${VAROUT}" = "VCS_WC_MODIFIED" ]]; then -+ elif [ "${VAROUT}" = "VCS_WC_MODIFIED" ]; then - echo "${VCS_WC_MODIFIED}" -+ else -+ echo "error: Not a valid output symbol." 1>&2 -+ exit 1 - fi - fi - - - # Detect requested output type and use it. --if [[ ! -z "${AFILETYPE}" ]]; then -- if [[ "${AFILETYPE}" = "h" ]]; then -+if [ ! -z "${AFILETYPE}" ]; then -+ if [ "${AFILETYPE}" = "h" ]; then - hOutput -- elif [[ "${AFILETYPE}" = "xcode" ]]; then -+ elif [ "${AFILETYPE}" = "xcode" ]; then - xcodeOutput -- elif [[ "${AFILETYPE}" = "sh" ]]; then -+ elif [ "${AFILETYPE}" = "sh" ]; then - shOutput -- elif [[ "${AFILETYPE}" = "py" ]]; then -+ elif [ "${AFILETYPE}" = "py" ] || [ "${AFILETYPE}" = "python" ]; then - pyOutput -- elif [[ "${AFILETYPE}" = "pl" ]]; then -+ elif [ "${AFILETYPE}" = "pl" ] || [ "${AFILETYPE}" = "perl" ]; then - plOutput -- elif [[ "${AFILETYPE}" = "lua" ]]; then -+ elif [ "${AFILETYPE}" = "lua" ]; then - luaOutput -- elif [[ "${AFILETYPE}" = "php" ]]; then -+ elif [ "${AFILETYPE}" = "php" ]; then - phpOutput -- elif [[ "${AFILETYPE}" = "ini" ]]; then -+ elif [ "${AFILETYPE}" = "ini" ]; then - iniOutput -- elif [[ "${AFILETYPE}" = "js" ]]; then -+ elif [ "${AFILETYPE}" = "js" ]; then - jsOutput -- elif [[ "${AFILETYPE}" = "java" ]]; then -+ elif [ "${AFILETYPE}" = "json" ]; then -+ jsonOutput -+ elif [ "${AFILETYPE}" = "java" ]; then - javaOutput -- elif [[ "${AFILETYPE}" = "javaprop" ]]; then -+ elif [ "${AFILETYPE}" = "javaprop" ]; then - javapropOutput -+ elif [ "${AFILETYPE}" = "tex" ]; then -+ texOutput -+ elif [ "${AFILETYPE}" = "m4" ]; then -+ m4Output - else - echo "error: Not a valid output type." 1>&2 - exit 1 -@@ -653,7 +761,7 @@ - - - # If requested, make a cache file. --if [[ ! -z "${CACHEFILE}" ]] && [[ ! "${CACHEFORCE}" = "1" ]]; then -+if [ ! -z "${CACHEFILE}" ] && [ ! "${CACHEFORCE}" = "1" ]; then - TARGETFILE="${CACHEFILE}" - shOutput - fi |