Source-Changes-HG archive

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

[src/trunk]: src/etc/rc.d Avoid unnecessary use of basename(1). From Jukka Sa...



details:   https://anonhg.NetBSD.org/src/rev/f3c3508742b5
branches:  trunk
changeset: 344839:f3c3508742b5
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Apr 23 21:24:31 2016 +0000

description:
Avoid unnecessary use of basename(1). From Jukka Salmi a long, long time
ago on a tech-kern far, far away.

diffstat:

 etc/rc.d/sysdb |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 7f5a4ef68c88 -r f3c3508742b5 etc/rc.d/sysdb
--- a/etc/rc.d/sysdb    Sat Apr 23 18:54:42 2016 +0000
+++ b/etc/rc.d/sysdb    Sat Apr 23 21:24:31 2016 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: sysdb,v 1.24 2012/06/03 21:42:45 joerg Exp $
+# $NetBSD: sysdb,v 1.25 2016/04/23 21:24:31 dholland Exp $
 #
 
 # PROVIDE: sysdb
@@ -44,7 +44,7 @@
                return
        fi
        if [ \( ! -f "$db" \) -o \( "$src" -nt "$db" \) ]; then
-               $echo -n "$comma$(basename "$src")"
+               $echo -n "$comma${src##*/}"
                comma=", "
                "$@"
        fi



Home | Main Index | Thread Index | Old Index