Browse Source

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 . .
master
freesource 24 years ago
parent
commit
8153cd55dc
  1. 28
      gBootRoot

28
gBootRoot

@ -114,10 +114,14 @@ my $version = "1.2.2";
my $date = "09.03.2000"; my $date = "09.03.2000";
my $gtk_perl_version = "0.7002"; my $gtk_perl_version = "0.7002";
my $pwd = `pwd`; chomp $pwd; my $pwd = `pwd`; chomp $pwd;
my $template_dir = "./";
my $home_rootfs = "$home/root_filesystem/"; my $home_rootfs = "$home/root_filesystem/";
my $home_uml_kernel = "$home/uml_kernel/"; 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 $initrd;
my $compress; my $compress;
my $false = 0; my $false = 0;
@ -246,6 +250,7 @@ home_builder($home_rootfs);
# $HOME/.gbootroot/uml_kernel # $HOME/.gbootroot/uml_kernel
home_builder($home_uml_kernel); home_builder($home_uml_kernel);
symlink_builder("/usr/bin/linux","$home_uml_kernel/linux");
if (!-e "$home_uml_kernel/.options") { if (!-e "$home_uml_kernel/.options") {
open(OPTIONS,">$home_uml_kernel/.options") open(OPTIONS,">$home_uml_kernel/.options")
or die "Couldn't write $home_uml_kernel/.options at $?\n"; or die "Couldn't write $home_uml_kernel/.options at $?\n";
@ -253,6 +258,27 @@ if (!-e "$home_uml_kernel/.options") {
close(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 { sub home_builder {
my ($home_builder) = @_; my ($home_builder) = @_;

Loading…
Cancel
Save