Commit e65b2b5a authored by claes's avatar claes

add can be called from script with arguments

parent 973841de
...@@ -120,9 +120,9 @@ sub add () ...@@ -120,9 +120,9 @@ sub add ()
$label = $_[0]; $label = $_[0];
$varstr = $envdb{$label}; $varstr = $envdb{$label};
if ($varstr ne "") { if ($varstr ne "") {
printf("++ Envrinoment %s already exists\n", $_[0]); printf("++ Environment %s already exists\n", $_[0]);
} else { } else {
get_vars(); get_vars(@_);
update_db(); update_db();
} }
untie(%envdb)|| die "++ can't untie $dbname!"; untie(%envdb)|| die "++ can't untie $dbname!";
...@@ -215,9 +215,9 @@ sub build_all_modules () ...@@ -215,9 +215,9 @@ sub build_all_modules ()
merge(); merge();
_module("tlog"); _module("tlog");
build_all(); build_all();
# merge(); merge();
# _module("remote"); _module("remote");
# build_all(); build_all();
merge(); merge();
_module("bcomp"); _module("bcomp");
build_all(); build_all();
...@@ -559,7 +559,6 @@ sub build_all () ...@@ -559,7 +559,6 @@ sub build_all ()
} }
} }
else { else {
printf( "Copy: %d Lib: %d Exe: %d\n", $copy, $lib, $exe);
if ( $copy == 1) { if ( $copy == 1) {
_build("wbl", "*", "copy"); _build("wbl", "*", "copy");
_build("lib", "*", "init copy"); _build("lib", "*", "init copy");
...@@ -993,14 +992,38 @@ sub create_dir() ...@@ -993,14 +992,38 @@ sub create_dir()
sub get_vars () sub get_vars ()
{ {
printf( "Arg: %s\n", $_[1]);
if ($_[1] eq "") {
$sroot = get_var(" Source root [%s]? ", $sroot); $sroot = get_var(" Source root [%s]? ", $sroot);
} else {
$sroot = $_[1];
}
# $vmsinc = get_var(" pwr_inc on VMS [%s]? ", $vmsinc); # $vmsinc = get_var(" pwr_inc on VMS [%s]? ", $vmsinc);
if ($_[2] eq "") {
$broot = get_var(" Build root [%s]? ", $broot); $broot = get_var(" Build root [%s]? ", $broot);
} else {
$broot = $_[2];
}
if ($_[3] eq "") {
$btype = get_var(" Build type [%s]? ", $btype); $btype = get_var(" Build type [%s]? ", $btype);
} else {
$btype = $_[3];
}
if ($_[4] eq "") {
$os = get_var(" OS [%s]? ", $os); $os = get_var(" OS [%s]? ", $os);
} else {
$os = $_[4];
}
if ($_[5] eq "") {
$hw = get_var(" Hardware [%s]? ", $hw); $hw = get_var(" Hardware [%s]? ", $hw);
} else {
$hw = $_[5];
}
if ($_[6] eq "") {
$desc = get_var(" Description [%s]? ", $desc); $desc = get_var(" Description [%s]? ", $desc);
} else {
$desc = $_[6];
}
$varstr = join(":", ($sroot, $vmsinc, $broot, $btype, $os, $hw, $desc)); $varstr = join(":", ($sroot, $vmsinc, $broot, $btype, $os, $hw, $desc));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment