From 06e4590d0a20ca083473a31c73ce7327e1af6eca Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Fri, 9 Apr 2010 01:48:15 +0200 Subject: [PATCH] Fix bashisms: echo -e -> printf --- debian/changelog | 5 +++-- hooks/common.sh | 2 +- t/modules.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index cc73f78..a407d60 100644 --- a/debian/changelog +++ b/debian/changelog @@ -36,10 +36,11 @@ xen-tools (4.2~rc1-1) UNRELEASED; urgency=low - [debian/control]: debhelper-but-no-misc-depends - [debian/copyright]: copyright-without-copyright-notice - [debian/source/format]: missing-debian-source-format - * Fix some bashisms + * Fix some bashisms (Closes: #530226) - [^y] → [!y] (Thanks to Mathieu Parent!) - kill -HUP → kill -s HUP (found by checkbashism) - - ${parm/?/pat[/str]} → echo | sed (Closes: #530226) + - ${parm/?/pat[/str]} → echo | sed + - echo -e → printf -- Axel Beckert Fri, 09 Apr 2010 01:30:49 +0200 diff --git a/hooks/common.sh b/hooks/common.sh index 618f004..107d11f 100755 --- a/hooks/common.sh +++ b/hooks/common.sh @@ -85,7 +85,7 @@ installDebianPackage () # # Use policy-rc to stop any daemons from starting. # - echo -e '#!/bin/bash\nexit 101\n' > ${prefix}/usr/sbin/policy-rc.d + printf '#!/bin/bash\nexit 101\n' > ${prefix}/usr/sbin/policy-rc.d chmod +x ${prefix}/usr/sbin/policy-rc.d # diff --git a/t/modules.sh b/t/modules.sh index a46337d..34eac2b 100755 --- a/t/modules.sh +++ b/t/modules.sh @@ -29,6 +29,6 @@ for i in `rgrep '^use ' .. | grep -v Expect | grep -v POSIX | grep -v Xen:: | gr do \ echo "BEGIN{ use_ok( '$i' ); }"; \ echo "require_ok( '$i' );" ; \ - echo -e "\n" ; \ + printf '\n' ; \ done