In most cases used printf %s ... instead.
echo -n > file lines to create empty / truncate files were
changed to : > file lines, like done in in test-lib-emacs.sh
And one echo -n " " replaced with use of sed "s/^/ /" in next line.
@echo "Which can be verified with:"
@echo ""
@echo " $(RELEASE_URL)/$(SHA256_FILE)"
@echo "Which can be verified with:"
@echo ""
@echo " $(RELEASE_URL)/$(SHA256_FILE)"
- @echo -n " "
- @cat releases/$(SHA256_FILE)
+ @sed "s/^/ /" releases/$(SHA256_FILE)
@echo ""
@echo " $(RELEASE_URL)/$(DETACHED_SIG_FILE)"
@echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
@echo ""
@echo " $(RELEASE_URL)/$(DETACHED_SIG_FILE)"
@echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
.PHONY: verify-newer
verify-newer:
.PHONY: verify-newer
verify-newer:
- @echo -n "Checking that no $(VERSION) release already exists..."
+ @printf %s "Checking that no $(VERSION) release already exists..."
@wget -q --no-check-certificate -O /dev/null $(RELEASE_URL)/$(TAR_FILE) ; \
case $$? in \
8) echo "Good." ;; \
@wget -q --no-check-certificate -O /dev/null $(RELEASE_URL)/$(TAR_FILE) ; \
case $$? in \
8) echo "Good." ;; \
# In the rest of this file, tests collect list of errors to be fixed
# In the rest of this file, tests collect list of errors to be fixed
-echo -n "Checking that git working directory is clean... "
+printf %s "Checking that git working directory is clean... "
git_status=`git status --porcelain`
if [ "$git_status" = '' ]
then
git_status=`git status --porcelain`
if [ "$git_status" = '' ]
then
append_emsg " Please follow the instructions in RELEASING to choose a version"
}
append_emsg " Please follow the instructions in RELEASING to choose a version"
}
-echo -n "Checking that '$VERSION' is good with digits and periods... "
+printf %s "Checking that '$VERSION' is good with digits and periods... "
case $VERSION in
*[!0-9.]*)
verfail "'$VERSION' contains other characters than digits and periods" ;;
case $VERSION in
*[!0-9.]*)
verfail "'$VERSION' contains other characters than digits and periods" ;;
*) verfail "'$VERSION' is a single number" ;;
esac
*) verfail "'$VERSION' is a single number" ;;
esac
-echo -n "Checking that this is Debian package for notmuch... "
+printf %s "Checking that this is Debian package for notmuch... "
read deb_notmuch deb_version rest < debian/changelog
if [ "$deb_notmuch" = 'notmuch' ]
then
read deb_notmuch deb_version rest < debian/changelog
if [ "$deb_notmuch" = 'notmuch' ]
then
append_emsg "Package name '$deb_notmuch' is not 'notmuch' in debian/changelog"
fi
append_emsg "Package name '$deb_notmuch' is not 'notmuch' in debian/changelog"
fi
-echo -n "Checking that Debian package version is $VERSION-1... "
+printf %s "Checking that Debian package version is $VERSION-1... "
if [ "$deb_version" = "($VERSION-1)" ]
then
if [ "$deb_version" = "($VERSION-1)" ]
then
append_emsg "Version '$deb_version' is not '($VERSION-1)' in debian/changelog"
fi
append_emsg "Version '$deb_version' is not '($VERSION-1)' in debian/changelog"
fi
-echo -n "Checking that python bindings version is $VERSION... "
+printf %s "Checking that python bindings version is $VERSION... "
py_version=`python3 -c "with open('$PV_FILE') as vf: exec(vf.read()); print(__VERSION__)"`
if [ "$py_version" = "$VERSION" ]
then
py_version=`python3 -c "with open('$PV_FILE') as vf: exec(vf.read()); print(__VERSION__)"`
if [ "$py_version" = "$VERSION" ]
then
append_emsg "Version '$py_version' is not '$VERSION' in $PV_FILE"
fi
append_emsg "Version '$py_version' is not '$VERSION' in $PV_FILE"
fi
-echo -n "Checking that NEWS header is tidy... "
+printf %s "Checking that NEWS header is tidy... "
if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ]
then
echo Yes.
if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ]
then
echo Yes.
-echo -n "Checking that this is Notmuch NEWS... "
+printf %s "Checking that this is Notmuch NEWS... "
read news_notmuch news_version news_date < NEWS
if [ "$news_notmuch" = "Notmuch" ]
then
read news_notmuch news_version news_date < NEWS
if [ "$news_notmuch" = "Notmuch" ]
then
append_emsg "First word '$news_notmuch' is not 'Notmuch' in NEWS file"
fi
append_emsg "First word '$news_notmuch' is not 'Notmuch' in NEWS file"
fi
-echo -n "Checking that NEWS version is $VERSION... "
+printf %s "Checking that NEWS version is $VERSION... "
if [ "$news_version" = "$VERSION" ]
then
echo Yes.
if [ "$news_version" = "$VERSION" ]
then
echo Yes.
#eval `date '+year=%Y mon=%m day=%d'`
today0utc=`date --date=0Z +%s` # gnu date feature
#eval `date '+year=%Y mon=%m day=%d'`
today0utc=`date --date=0Z +%s` # gnu date feature
-echo -n "Checking that NEWS date is right... "
+printf %s "Checking that NEWS date is right... "
case $news_date in
'('[2-9][0-9][0-9][0-9]-[01][0-9]-[0123][0-9]')')
newsdate0utc=`nd=${news_date#\\(}; date --date="${nd%)} 0Z" +%s`
case $news_date in
'('[2-9][0-9][0-9][0-9]-[01][0-9]-[0123][0-9]')')
newsdate0utc=`nd=${news_date#\\(}; date --date="${nd%)} 0Z" +%s`
esac
year=`exec date +%Y`
esac
year=`exec date +%Y`
-echo -n "Checking that copyright in documentation contains 2009-$year... "
+printf %s "Checking that copyright in documentation contains 2009-$year... "
# Read the value of variable `copyright' defined in 'doc/conf.py'.
copyrightline=$(grep ^copyright doc/conf.py)
case $copyrightline in
# Read the value of variable `copyright' defined in 'doc/conf.py'.
copyrightline=$(grep ^copyright doc/conf.py)
case $copyrightline in
test_begin_subtest "search for non-existent message prints nothing"
notmuch search "no-message-matches-this" > OUTPUT
test_begin_subtest "search for non-existent message prints nothing"
notmuch search "no-message-matches-this" > OUTPUT
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search --format=json for non-existent message prints proper empty json"
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search --format=json for non-existent message prints proper empty json"
test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair"
notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out
test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair"
notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out
-echo -n -e "\xEF\x0D\x0A" > crlf.expected
+printf "\xEF\x0D\x0A" > crlf.expected
test_expect_equal_file crlf.out crlf.expected
test_expect_equal_file crlf.out crlf.expected
# Check output against golden output
outcount=$(cat outcount)
# Check output against golden output
outcount=$(cat outcount)
- echo -n > searchall
- echo -n > expectall
+ : > searchall
+ : > expectall
for ((i = 0; i < $outcount; i++)); do
if ! cmp -s search.$i expected; then
# Find the range of interruptions that match this output
for ((i = 0; i < $outcount; i++)); do
if ! cmp -s search.$i expected; then
# Find the range of interruptions that match this output