Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/postinstall Delete trailing slash with "${1%/}", no...



details:   https://anonhg.NetBSD.org/src/rev/31255e5b44fc
branches:  trunk
changeset: 329997:31255e5b44fc
user:      apb <apb%NetBSD.org@localhost>
date:      Mon Jun 16 22:04:39 2014 +0000

description:
Delete trailing slash with "${1%/}", not "${1#/}".

diffstat:

 usr.sbin/postinstall/postinstall |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 52154efc2946 -r 31255e5b44fc usr.sbin/postinstall/postinstall
--- a/usr.sbin/postinstall/postinstall  Mon Jun 16 21:07:28 2014 +0000
+++ b/usr.sbin/postinstall/postinstall  Mon Jun 16 22:04:39 2014 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.172 2014/06/16 08:59:13 apb Exp $
+# $NetBSD: postinstall,v 1.173 2014/06/16 22:04:39 apb Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -150,7 +150,7 @@
 unprefix()
 {
        [ $# -eq 1 ] || err 3 "USAGE: unprefix dir"
-       local prefix="${1#/}"
+       local prefix="${1%/}"
        prefix="$(bre_quote "${prefix}")"
 
        ${SED} -e "s,^${prefix}/,/,"



Home | Main Index | Thread Index | Old Index