When building xCAT-server rpm, a Unknow option: help message

appears.  This is caused by the xCATreg tool not implementing
the --help option  (was -h or ? for help)

build-readme requires the tools to implement the help option
This commit is contained in:
Victor Hu 2015-03-12 15:09:40 -04:00
parent 6c6994af5a
commit e581247ade

View File

@ -165,7 +165,7 @@ sub xCATreg_init{
#init important attributes
$date = `date +"%Y%m%d"`;
$date = `date +"%Y%m%d"`;
chomp($date);
&runcmd("mkdir -p $logfiledir") if(! -e $logfiledir);
@ -1031,29 +1031,13 @@ sub git_update{
return 0;
}
xCATreg_init();
###############################################################
# Mainfunction
###############################################################
send_msg(2,"........................");
send_msg(2,"........................");
send_msg(2,".....ooooO..............");
send_msg(2,"....(....)....Ooooo.....");
send_msg(2,".....\\..(.....(....)....");
send_msg(2,"......\\__).....)../.....");
send_msg(2,"..............(_ /......");
send_msg(2,"........................");
send_msg(2,".........START .........");
send_msg(2,"........................");
#######################################
# step 0. Parse input arguments
#######################################
send_msg(2, "step 1, Parse input arguments............");
=pod
if (
!GetOptions("h|?" => \$needhelp,
!GetOptions("--help|h|?" => \$needhelp,
"f=s" => \$configfile,
"b=s" => \$branch,
"m=s" => \$management_node,
@ -1063,7 +1047,7 @@ if (
)
=cut
if (
!GetOptions("h|?" => \$needhelp,
!GetOptions("--help|h|?" => \$needhelp,
"f=s" => \$configfile,
"b=s" => \$branch,
"m=s" => \$management_node,
@ -1081,6 +1065,22 @@ if ($needhelp)
exit 0;
}
xCATreg_init();
###############################################################
# Mainfunction
###############################################################
send_msg(2,"........................");
send_msg(2,"........................");
send_msg(2,".....ooooO..............");
send_msg(2,"....(....)....Ooooo.....");
send_msg(2,".....\\..(.....(....)....");
send_msg(2,"......\\__).....)../.....");
send_msg(2,"..............(_ /......");
send_msg(2,"........................");
send_msg(2,".........START .........");
send_msg(2,"........................");
#######################################
# step 1. Read configuration files
#######################################