Source-Changes-HG archive

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

[src/trunk]: src/bin/sh Begone unspecified test-a ... and be more obious what...



details:   https://anonhg.NetBSD.org/src/rev/4befaecc5fd3
branches:  trunk
changeset: 993551:4befaecc5fd3
user:      kre <kre%NetBSD.org@localhost>
date:      Sun Sep 16 22:31:30 2018 +0000

description:
Begone unspecified test-a ... and be more obious what it was doing.

diffstat:

 bin/sh/mkinit.sh |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r 82dd426ca2e6 -r 4befaecc5fd3 bin/sh/mkinit.sh
--- a/bin/sh/mkinit.sh  Sun Sep 16 22:22:44 2018 +0000
+++ b/bin/sh/mkinit.sh  Sun Sep 16 22:31:30 2018 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-#      $NetBSD: mkinit.sh,v 1.7 2016/03/27 14:34:46 christos Exp $
+#      $NetBSD: mkinit.sh,v 1.8 2018/09/16 22:31:30 kre Exp $
 
 # Copyright (c) 2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -102,8 +102,11 @@
                        read -r line
                        [ "$line" != "}" ]
                do
-                       [ -n "$line" -a "$line" = "${line###}" ] &&
-                               line="  $line"
+                       case "$line" in
+                       ('')    ;;
+                       ('#'*)  ;;
+                       (*)     line="  $line";;
+                       esac
                        ev="${ev}${line}${nl}"
                done
                ev="${ev}       }${nl}"



Home | Main Index | Thread Index | Old Index