From 8153cd55dc72a1644f7e061a656902f383c4fcfe Mon Sep 17 00:00:00 2001 From: freesource Date: Tue, 31 Jul 2001 04:41:27 +0000 Subject: [PATCH] This adds symlink_builder(), yard/replacements and yard/templates. Soon gBootRoot will change to gbootroot, and *pm will be put in gBootRoot to make developing easier .. just use perl -I . . --- gBootRoot | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/gBootRoot b/gBootRoot index 511d515..0317da3 100644 --- a/gBootRoot +++ b/gBootRoot @@ -114,10 +114,14 @@ my $version = "1.2.2"; my $date = "09.03.2000"; my $gtk_perl_version = "0.7002"; my $pwd = `pwd`; chomp $pwd; -my $template_dir = "./"; my $home_rootfs = "$home/root_filesystem/"; my $home_uml_kernel = "$home/uml_kernel/"; +# Yard Stuff +my $home_yard = "$home/yard"; +my $template_dir = "$home_yard/templates"; +my $home_yard_replacements = "$home_yard/replacements"; + my $initrd; my $compress; my $false = 0; @@ -246,6 +250,7 @@ home_builder($home_rootfs); # $HOME/.gbootroot/uml_kernel home_builder($home_uml_kernel); +symlink_builder("/usr/bin/linux","$home_uml_kernel/linux"); if (!-e "$home_uml_kernel/.options") { open(OPTIONS,">$home_uml_kernel/.options") or die "Couldn't write $home_uml_kernel/.options at $?\n"; @@ -253,6 +258,27 @@ if (!-e "$home_uml_kernel/.options") { close(OPTIONS); } +# $HOME/.gbootroot/yard/templates +home_builder($template_dir); + +# $HOME/.gbootroot/yard/replacements +home_builder($home_yard_replacements); + +# Basically so different users get the same things in +# their personal directories. +sub symlink_builder { + + my ($oldfile,$newfile) = @_; + + if (!-e $newfile && !-l $newfile) { + my $error; + symlink($oldfile,$newfile) or + ($error = error("Can not make symlink to $oldfile + from $newfile.\n")); + } + +} + sub home_builder { my ($home_builder) = @_;