Am 9/5/2011 7:11, schrieb Naohiro Aota:
Variable expansions like "${foo#bar}" or "${foo%bar}" doesn't work on
shells like FreeBSD sh and they made the test to fail. This patch
replace such variable expansions with sed.
Signed-off-by: Naohiro Aota <redacted>
---
Testing on FreeBSD failed because of this "bash-ism".
These are not bashism, but features require by POSIX.
I'd rather suspect that the failures are not because FreeBSD sh does not
have ${%} or ${#}, but rather that it interprets the meaning of the
backslash in this case in a way different from other shells.
run_backend() {
echo "$2" |
- QUERY_STRING="${1#*\?}" \
- PATH_TRANSLATED="$HTTPD_DOCUMENT_ROOT_PATH/${1%%\?*}" \
What happens if you write these as
QUERY_STRING=${1#*\?} \
PATH_TRANSLATED=$HTTPD_DOCUMENT_ROOT_PATH/${1%%\?*} \
i.e., drop the double-quotes?
-- Hannes