Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/embedded/files explicitly strip carriage retur...



details:   https://anonhg.NetBSD.org/src/rev/0e579a319608
branches:  trunk
changeset: 457102:0e579a319608
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Jun 12 00:28:56 2019 +0000

description:
explicitly strip carriage return so that non-unix text files work.

diffstat:

 distrib/utils/embedded/files/creds_msdos |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r f1dc3c7ad0ad -r 0e579a319608 distrib/utils/embedded/files/creds_msdos
--- a/distrib/utils/embedded/files/creds_msdos  Wed Jun 12 00:05:48 2019 +0000
+++ b/distrib/utils/embedded/files/creds_msdos  Wed Jun 12 00:28:56 2019 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: creds_msdos,v 1.1 2019/06/11 10:50:57 mrg Exp $
+# $NetBSD: creds_msdos,v 1.2 2019/06/12 00:28:56 mrg Exp $
 #
 # Copyright (c) 2019 Matthew R. Green
 # All rights reserved.
@@ -154,6 +154,8 @@
 
        if [ -f "${creds_file}" ]; then
                while read type user arg1; do
+                       # strip cr
+                       arg1=$(echo "$arg1" | tr -d '\015')
                        case "$type" in
                        \#*|'')
                                continue



Home | Main Index | Thread Index | Old Index