Browse Source

All replacements are now symlinks, and they will also be read-only.

master
freesource 23 years ago
parent
commit
1c246541f2
  1. 7
      gbootroot

7
gbootroot

@ -488,7 +488,11 @@ if (-d $global_yard_replacements) {
find sub { ( my $replacement = find sub { ( my $replacement =
$File::Find::name ) =~ s/$global_yard_replacements\///; $File::Find::name ) =~ s/$global_yard_replacements\///;
if (!-e "$home_yard_replacements/$replacement") { 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; }, $global_yard_replacements;
@ -504,6 +508,7 @@ sub symlink_builder {
my ($oldfile,$newfile) = @_; my ($oldfile,$newfile) = @_;
if (!-e $newfile && !-l $newfile) { if (!-e $newfile && !-l $newfile) {
my $error; my $error;
symlink($oldfile,$newfile) or symlink($oldfile,$newfile) or

Loading…
Cancel
Save