mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/10760] Use echo -e only if echo understands -e.
/bin/echo on freebsd and dash's builtin echo do not understand -e, therefore -e is printed with the other messages in such cases. Test if echo understands -e, if not do not use it. PHPBB3-10760
This commit is contained in:
parent
57209a1e68
commit
786fcbf212
1 changed files with 9 additions and 2 deletions
|
@ -17,6 +17,13 @@ then
|
||||||
PHP_BIN=php
|
PHP_BIN=php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $(echo -e test) = test ]
|
||||||
|
then
|
||||||
|
echo_e="echo -e"
|
||||||
|
else
|
||||||
|
echo_e="echo"
|
||||||
|
fi
|
||||||
|
|
||||||
# necessary check for initial commit
|
# necessary check for initial commit
|
||||||
if git rev-parse --verify HEAD >/dev/null 2>&1
|
if git rev-parse --verify HEAD >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
|
@ -78,7 +85,7 @@ unset IFS
|
||||||
|
|
||||||
if [ $error -eq 1 ]
|
if [ $error -eq 1 ]
|
||||||
then
|
then
|
||||||
echo -e "PHP Syntax check failed:";
|
echo "PHP Syntax check failed:"
|
||||||
echo -e "$errors" | grep "^Parse error:"
|
$echo_e "$errors" | grep "^Parse error:"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue