X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/blobdiff_plain/cac38f7fe315b2869985b49beaca4677c568b853..282625e1b87743236f1cb8c70c2762edd413c6b0:/confsubst.in diff --git a/confsubst.in b/confsubst.in index 86c8bb0..f9ba37b 100755 --- a/confsubst.in +++ b/confsubst.in @@ -75,11 +75,10 @@ file=$1; shift subst="" for fixup; do case "$fixup" in - *?=*?) ;; + *?=*) ;; *) echo >&2 "$0: bad substitution: $fixup"; exit 1 ;; esac - tag=$(echo "$fixup" | sed 's/=.*$//') && \ - value=$(echo "$fixup" | sed 's/^[^=]*=//') && \ + tag=${fixup%%=*} value=${fixup#*=} subst="$subst s@$tag@$valueg;" done