[packages/efi-boot-update] Disable backslash escaping in echo

jajcus jajcus at pld-linux.org
Thu Oct 24 21:38:15 CEST 2013


commit 7a5c96c9301cb4ea8bfb973fbee40553bd828372
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Thu Oct 24 17:52:53 2013 +0200

    Disable backslash escaping in echo
    
    In shells where echo backslash escaping is enabled by default
    the EFI paths (backslash-delimited) get badly scrambled.

 efi-boot-update | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/efi-boot-update b/efi-boot-update
index ec420f7..b031d67 100755
--- a/efi-boot-update
+++ b/efi-boot-update
@@ -19,18 +19,18 @@ usage () {
 }
 
 msg () {
-    echo "efi-boot-update: $*" >&2
+    echo -E "efi-boot-update: $*" >&2
 }
 
 verbose () {
     if is_yes "$VERBOSE" ; then 
-        echo "efi-boot-update: $*" >&2
+        echo -E "efi-boot-update: $*" >&2
     fi
 }
 
 verbose_cmd () {
     if is_yes "$VERBOSE" ; then
-        echo "+$*" >&2
+        echo -E "+$*" >&2
     fi
     "$@"
 }
@@ -42,7 +42,7 @@ list_remove () {
         if [ "$item" = "$2" ] ; then
             continue
         fi
-        echo -n "$item "
+        echo -nE "$item "
     done
 }
 
@@ -140,7 +140,7 @@ add_bootmgr_entry () {
         binary="$DESTDIR/$binary"
     fi
     binary="${binary#/boot/efi}"
-    binary="$(echo -n "$binary"|sed -e's;/;\\;g')"
+    binary="$(echo -nE "$binary"|sed -e's;/;\\;g')"
 
     if [ -n "$bootnum" ] ; then
         echo -n "$args" | verbose_cmd $EFIBOOTMGR $EFIBOOTMGR_OPTS --quiet \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/efi-boot-update.git/commitdiff/34a0c5933dc61abd51c721da00d365322d02841e



More information about the pld-cvs-commit mailing list