From 1c246541f27aaa3ecb2f69561f5ed80adece5904 Mon Sep 17 00:00:00 2001 From: freesource Date: Mon, 5 Nov 2001 03:48:00 +0000 Subject: [PATCH] All replacements are now symlinks, and they will also be read-only. --- gbootroot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gbootroot b/gbootroot index f3170af..35ae92a 100755 --- a/gbootroot +++ b/gbootroot @@ -488,7 +488,11 @@ if (-d $global_yard_replacements) { find sub { ( my $replacement = $File::Find::name ) =~ s/$global_yard_replacements\///; if (!-e "$home_yard_replacements/$replacement") { - system "cp -a $File::Find::name $home_yard_replacements/$replacement > /dev/null 2>&1"; + + #system "cp -a $File::Find::name $home_yard_replacements/$replacement > /dev/null 2>&1"; + system "mkdir $home_yard_replacements/$replacement > /dev/null 2>&1" if -d $File::Find::name; + symlink_builder( $File::Find::name,"$home_yard_replacements/$replacement") if !-d $File::Find::name; + } }, $global_yard_replacements; @@ -504,6 +508,7 @@ sub symlink_builder { my ($oldfile,$newfile) = @_; + if (!-e $newfile && !-l $newfile) { my $error; symlink($oldfile,$newfile) or