Asks questions, produce the current configuration 'lago-configs' file\n
Asks questions, produce the current configuration 'lago-configs' file\n
-c Ask only for detector calibration parameters
-? Shows this help and ends
-? Shows this help and ends
\n
\n
Examples:
Examples:
...
@@ -342,10 +353,13 @@ $usage="
...
@@ -342,10 +353,13 @@ $usage="
LAGO ACQUA, http://wiki.lagoproject.org/index.php?title=ACQUA";
LAGO ACQUA, http://wiki.lagoproject.org/index.php?title=ACQUA";
if($help){
if($iHelp){
die"$usage\n";
die"$usage\n";
}
}
if($iCalib){
print"# WARNING\t\tOnly calibration parameters will be asked.\n";
}
# Let's start
# Let's start
# Check if LAGO environment is defined
# Check if LAGO environment is defined
...
@@ -355,6 +369,7 @@ $pwd=$ENV{'PWD'};
...
@@ -355,6 +369,7 @@ $pwd=$ENV{'PWD'};
unless(defined($ENV{"$parameters[0]"})){
unless(defined($ENV{"$parameters[0]"})){
print"# WARNING\t$parameters[0] environment variable is not defined.\n\t\tProbably this is a first installation of LAGO ACQUA in this\n\t\tsystem. I will include a line into your .bashrc (assuming\n\t\tyou are using bash. If not just add the contents of .bashrc\n\t\tinto your environments file). The original .bashrc will be\n\t\trenamed to .bashrc-lago.bak.\n";
print"# WARNING\t$parameters[0] environment variable is not defined.\n\t\tProbably this is a first installation of LAGO ACQUA in this\n\t\tsystem. I will include a line into your .bashrc (assuming\n\t\tyou are using bash. If not just add the contents of .bashrc\n\t\tinto your environments file). The original .bashrc will be\n\t\trenamed to .bashrc-lago.bak.\n";
print"# SUCCESS\tLAGO environment variable is set and .bashrc was changed\n\n";
print"# SUCCESS\tLAGO environment variable is set and .bashrc was changed\n\n";
}else{
}else{
print"# STATUS\tNothing change, but I don't understand what do you want to do then.\n";
print"# STATUS\tNothing change, but I don't understand what do you want to do then.\n";
...
@@ -394,6 +410,7 @@ if (-e "lago-configs") {
...
@@ -394,6 +410,7 @@ if (-e "lago-configs") {
}else{
}else{
$tmp=get("# WARNING\tI can't find a previous 'lago-configs' file.\n\t\tThis could mean that this is the first time you will run\n\t\tthe LAGO ACQUA BRC DAQ in this system, or that you are not\n\t\tin the correct directory. If you continue, a new lago-configs\n\t\tfile will be created here and the current path will be assumed\n\t\tas the LAGO DAQ main directory.\nDo you want to continue (y/n)",'n',"NEWCONFIG");
$tmp=get("# WARNING\tI can't find a previous 'lago-configs' file.\n\t\tThis could mean that this is the first time you will run\n\t\tthe LAGO ACQUA BRC DAQ in this system, or that you are not\n\t\tin the correct directory. If you continue, a new lago-configs\n\t\tfile will be created here and the current path will be assumed\n\t\tas the LAGO DAQ main directory.\nDo you want to continue (y/n)",'n',"NEWCONFIG");
die"\n# STATUS\tCheck if you are in the correct directory. Conf not changed.\nBye\n"unless($tmpeq'y');
die"\n# STATUS\tCheck if you are in the correct directory. Conf not changed.\nBye\n"unless($tmpeq'y');