MacOS' implementation of echo(1) does not support the -n flag.
NOTIDY=`$(PO2HTML) --help | grep -o "[-]-notidy"`
.po.lang:
- if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no" && test "$(PO2HTML)" != "off" && test -f $(top_srcdir)/errors/en.po; then \
- lang=`basename $@ .lang`; \
+ @if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no" && test "$(PO2HTML)" != "off" && test -f $(top_srcdir)/errors/en.po; then \
+ lang=$(@:.lang=); \
mkdir -p $(top_builddir)/errors/$$lang; \
- echo -n "Translate '$$lang' ..."; \
+ echo "Translating $$lang ..."; \
for f in $(ERROR_TEMPLATES); do \
page=`basename $$f`; \
$(PO2HTML) $(NOTIDY) --progress=none -i $(top_srcdir)/errors/$$lang.po -t $(top_srcdir)/errors/$$f >$(top_builddir)/errors/$$lang/$$page || exit 1; \
done; \
cp $(top_srcdir)/errors/templates/error-details.txt $(top_builddir)/errors/$$lang/error-details.txt || exit 1; \
- echo "done."; \
+ echo "Done translating $$lang"; \
+ else \
+ lang=$(@:.lang=); \
+ echo "Translation of $$lang disabled\n"; \
fi; \
touch $@
echo "## $GeneratedByMe"
echo
- echo -n "$1 ="
+ printf "%s =" "$1"
# Only some files are formed from *.po filenames, but all such files
# should list *.lang filenames instead.
git ls-files $2$3 | sed -e s%$2%%g -e 's%\.po%\.lang%g' | while read f; do
- echo " \\"
- echo -n " ${f}"
+ printf ' \\\n\t%s' "${f}"
done
- echo ""
+ printf '\n'
}
generateAmFile ()
set -e
-echo -n "Codespell version: "
+printf "Codespell version: "
if ! codespell --version; then
echo "This script requires codespell which was not found."
exit 1
## Update all existing dictionaries with the new content ...
for f in `ls -1 ./*.po` ; do
- echo -n "Update: ${f} ... "
+ printf "Update: %s ... " "${f}"
msgmerge --verbose -s -o ${f}.new ${f} errpages.pot
chown --reference=${f} ${f}.new
mv ${f}.new ${f}
echo "BUILD: ${config}"
. ${config}
else
- echo -n "BUILD ERROR: Unable to locate test configuration '${config}' from " && pwd
+ printf "BUILD ERROR: Unable to locate test configuration '%s' from " "${config}" && pwd
exit 1;
fi