Re: svn commit: r245751 - head/tools

2013-01-22 Thread Pawel Jakub Dawidek
On Mon, Jan 21, 2013 at 10:32:00PM +, Brooks Davis wrote:
 Author: brooks
 Date: Mon Jan 21 22:32:00 2013
 New Revision: 245751
 URL: http://svnweb.freebsd.org/changeset/base/245751
 
 Log:
   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.

I was doing installworld today and it failed on 'install -l ...' saying
'/sys/sys' is not empty. When I removed /sys symlink it installed ok.
Was this because of your change?

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl


pgpcjFEWvKhtb.pgp
Description: PGP signature


Re: svn commit: r245751 - head/tools

2013-01-22 Thread Pawel Jakub Dawidek
On Tue, Jan 22, 2013 at 07:00:05PM +0100, Pawel Jakub Dawidek wrote:
 On Mon, Jan 21, 2013 at 10:32:00PM +, Brooks Davis wrote:
  Author: brooks
  Date: Mon Jan 21 22:32:00 2013
  New Revision: 245751
  URL: http://svnweb.freebsd.org/changeset/base/245751
  
  Log:
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.
 
 I was doing installworld today and it failed on 'install -l ...' saying
 '/sys/sys' is not empty. When I removed /sys symlink it installed ok.
 Was this because of your change?

I see it is fixed already, sorry for the noice.

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl


pgp90fxTMxmuL.pgp
Description: PGP signature


svn commit: r245751 - head/tools

2013-01-21 Thread Brooks Davis
Author: brooks
Date: Mon Jan 21 22:32:00 2013
New Revision: 245751
URL: http://svnweb.freebsd.org/changeset/base/245751

Log:
  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

Modified:
  head/tools/install.sh

Modified: head/tools/install.sh
==
--- head/tools/install.sh   Mon Jan 21 22:07:34 2013(r245750)
+++ head/tools/install.sh   Mon Jan 21 22:32:00 2013(r245751)
@@ -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 $@
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org