From owner-svn-src-all@FreeBSD.ORG Fri Mar 15 15:21:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AD274C1; Fri, 15 Mar 2013 15:21:35 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9BA70872; Fri, 15 Mar 2013 15:21:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FFLZZR062377; Fri, 15 Mar 2013 15:21:35 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FFLZuH062375; Fri, 15 Mar 2013 15:21:35 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201303151521.r2FFLZuH062375@svn.freebsd.org> From: Brooks Davis Date: Fri, 15 Mar 2013 15:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r248332 - stable/9/tools X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2013 15:21:35 -0000 Author: brooks Date: Fri Mar 15 15:21:34 2013 New Revision: 248332 URL: http://svnweb.freebsd.org/changeset/base/248332 Log: MFC r245751,245893: r245751: Implement the -l option using ln(1) to facilitate boostrapping. Ignore the new options -D, -h, -T, and -U. Adjust -M support to ignore an argument. Sponsored by: DARPA, AFRL Reviewed by: ian, ray, rpaulo r245893: Use = not == in test arguments. Submitted by: Christoph Mallon Modified: stable/9/tools/install.sh Directory Properties: stable/9/tools/ (props changed) Modified: stable/9/tools/install.sh ============================================================================== --- stable/9/tools/install.sh Fri Mar 15 15:19:33 2013 (r248331) +++ stable/9/tools/install.sh Fri Mar 15 15:21:34 2013 (r248332) @@ -30,12 +30,22 @@ # parse install's options and ignore them completely. dirmode="" +linkmode="" while [ $# -gt 0 ]; do case $1 in -d) dirmode="YES"; shift;; - -[bCcMpSsv]) shift;; - -[Bfgmo]) shift; shift;; - -[Bfgmo]*) shift;; + -[bCcpSsv]) shift;; + -[BDfghMmNoTU]) shift; shift;; + -[BDfghMmNoTU]*) shift;; + -l) + shift + case $1 in + *[sm]*) linkmode="symbolic";; # XXX: 'm' should prefer hard + *h*) linkmode="hard";; + *) echo "invalid link mode"; exit 1;; + esac + shift + ;; *) break; esac done @@ -51,7 +61,13 @@ if [ -z "$dirmode" ] && [ "$#" -lt 2 ]; fi # the remaining arguments are assumed to be files/dirs only. -if [ -z "$dirmode" ]; then +if [ -n "${linkmode}" ]; then + if [ "${linkmode}" = "symbolic" ]; then + ln -fsh "$@" + else + ln -f "$@" + fi +elif [ -z "$dirmode" ]; then exec install -p "$@" else exec install -d "$@"