From b78a85686f1de34aea2d1b6b04deaae9c1f6babc Mon Sep 17 00:00:00 2001 From: freesource Date: Thu, 14 Nov 2002 19:49:12 +0000 Subject: [PATCH] This add --help|-h and the corresponding text. Just need to get uml-exlusively working properly --- BootRoot/BootRoot.pm | 31 +++++++++++++++++++++++++++++++ BootRoot/Options.pm | 1 + 2 files changed, 32 insertions(+) diff --git a/BootRoot/BootRoot.pm b/BootRoot/BootRoot.pm index 26b7ea2..dccb709 100644 --- a/BootRoot/BootRoot.pm +++ b/BootRoot/BootRoot.pm @@ -798,6 +798,37 @@ else { # # create_uml() create_expect_uml($filesystem_size, $tmp, $filename); ######################################################## +# What to do if somebody specifies help + + if ( $option{help} || $option{h} ) { + + print "Usage: gbootroot [OPTION]...\n"; + print " --help -h help\n"; + print " --template=name required option - template " . + "in default template dir\n"; + print " $template_dir" . "[name]\n\n"; + print " (defaults)\n"; + print " --method=name yard\n"; + print " --root-filename=name root_fs\n"; + print " --filesystem-size=size 8192\n"; + print " --filesystem-command=c \"$::makefs\"\n"; + print " --uml-exclusively=on|off off\n"; + print " --uml-kernel=path $ENV{HOME}/.gbootroot/" . + "uml_kernel/linuxbr\n"; + print " --preserve-ownership=y|n n\n\n"; + print " (system kernel options)\n"; + print " --kernel=path specify different system kernel\n"; + print " --kernel-version=version specify alternative version\n\n"; + print " (print options)\n"; + print " --no-stdout don't print to console\n\n"; + print "filesytem-commands supported by root_fs_helper:\n"; + print "mke2fs mkcramfs genromfs mkfs.minix mkminix mkreiserfs " . + "mkfs.jffs mkfs.jffs2\n"; + print "\nReport bugs to \n"; + exit; + + } + # Let's read in the ARGV die "specify a template found in $template_dir\nuse --template\n" diff --git a/BootRoot/Options.pm b/BootRoot/Options.pm index d48ea0a..bf77151 100644 --- a/BootRoot/Options.pm +++ b/BootRoot/Options.pm @@ -34,6 +34,7 @@ sub option { GetOptions ( \%option, + "help", "root-filename=s", "uml-kernel=s", "method=s",