From: Jacek Konieczny Date: Thu, 24 Oct 2013 15:52:53 +0000 (+0200) Subject: Disable backslash escaping in echo X-Git-Tag: auto/th/efi-boot-update-0.2-1~6 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fefi-boot-update.git;a=commitdiff_plain;h=7a5c96c9301cb4ea8bfb973fbee40553bd828372 Disable backslash escaping in echo In shells where echo backslash escaping is enabled by default the EFI paths (backslash-delimited) get badly scrambled. --- 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 \