[Debian-med-packaging] Bug#486048: minc-tools: bashism in /bin/sh script
Vincent Zweije
vincent at zweije.nl.eu.org
Sun Jun 15 16:53:10 UTC 2008
tag 486048 patch
thanks
On Thu, Jun 12, 2008 at 11:41:40PM -0500, Raphael Geissert wrote:
|| While performing an archive wide checkbashisms (from the 'devscripts' package)
|| check I've found your package containing one or more /bin/sh scripts making
|| use of bashisms.
||
|| checkbashisms' output:
|| > possible bashism in ./usr/bin/mincedit line 142 (unsafe echo with
|| > backslash):
|| > echo "${0}: Error reading file '$infile'\n"
|| > possible bashism in ./usr/bin/mincedit line 158 (unsafe echo with
|| > backslash):
|| > echo "$me: Error editing with editor '$editor'\n"
|| > possible bashism in ./usr/bin/mincedit line 168 (unsafe echo with
|| > backslash):
|| > echo "$me: File $infile not modified\n"
The following patch should fix this:
diff -rud minc-2.0.15.orig/progs/mincedit/mincedit minc-2.0.15/progs/mincedit/mincedit
--- minc-2.0.15.orig/progs/mincedit/mincedit 2008-02-05 14:48:45.000000000 +0100
+++ minc-2.0.15/progs/mincedit/mincedit 2008-06-15 18:42:06.000000000 +0200
@@ -139,7 +139,8 @@
status=$?
if [ $status -ne 0 ]
then
- echo "${0}: Error reading file '$infile'\n"
+ echo "${0}: Error reading file '$infile'"
+ echo
exit 1
fi
@@ -155,7 +156,8 @@
status=$?
if [ $status -ne 0 ]
then
- echo "$me: Error editing with editor '$editor'\n"
+ echo "$me: Error editing with editor '$editor'"
+ echo
exit 1
fi
do_edit=0
@@ -165,7 +167,8 @@
status=$?
if [ $status -eq 0 ]
then
- echo "$me: File $infile not modified\n"
+ echo "$me: File $infile not modified"
+ echo
exit 0
fi
Ciao. Vincent.
More information about the Debian-med-packaging
mailing list