Skip to content
Snippets Groups Projects
Commit c83568b6 authored by Hernán Asorey's avatar Hernán Asorey
Browse files

Some questions improved. Autodelete old files included

parent 2f84d419
No related branches found
Tags acqua-v1r1
No related merge requests found
...@@ -75,11 +75,11 @@ push @parameters, ...@@ -75,11 +75,11 @@ push @parameters,
0, 0,
"", "",
"siteLat", "siteLat",
"Site Latitude (+/- dec deg, <0 = South)", "Site Geographic Latitude (+/- dec deg, <0 = South)",
1, 1,
0., 0.,
"siteLong", "siteLong",
"Site Longitude (+/- dec deg, <0 = West)", "Site Geographic Longitude (+/- dec deg, <0 = West)",
1, 1,
0., 0.,
"siteAlt", "siteAlt",
...@@ -279,7 +279,7 @@ push @parameters, ...@@ -279,7 +279,7 @@ push @parameters,
2, 2,
"n", "n",
# TRANSFER 196-211 # TRANSFER 196-215
"autoTransfer", "autoTransfer",
"Should I automatically transfer data to the central repository?", "Should I automatically transfer data to the central repository?",
2, 2,
...@@ -295,7 +295,11 @@ push @parameters, ...@@ -295,7 +295,11 @@ push @parameters,
"remoteIP", "remoteIP",
"IP of the central repository (remote)", "IP of the central repository (remote)",
0, 0,
"200.16.117.76"; "200.16.117.76",
"eraseOldFiles",
"WARNING: If yes, it will erase local data and metadata files older than 30 days",
2,
"n";
sub get { sub get {
my $question = $_[0]; my $question = $_[0];
...@@ -541,7 +545,7 @@ ask(168,193,$block,$blockN); ...@@ -541,7 +545,7 @@ ask(168,193,$block,$blockN);
print "$parameters[196]"; print "$parameters[196]";
$blockN=5; # TRANSFER $blockN=5; # TRANSFER
$block="# BLOCK\t\tDATA TRANSFER"; $block="# BLOCK\t\tDATA TRANSFER";
ask(196,211,$block,$blockN); ask(196,215,$block,$blockN);
# not asking values (backward compatibility) # not asking values (backward compatibility)
......
...@@ -26,7 +26,13 @@ for i in ${files}; do ...@@ -26,7 +26,13 @@ for i in ${files}; do
fi fi
fi fi
bzip2 -1v $i bzip2 -1v $i
if ($hasUSB); then
mv -v ${work}/*.bz2 ${usb}/
fi
done done
files=$(find ${work} -iname "*.mtd" -type f -mmin +30)
for i in ${files}; do
echo $i
bzip2 -1v $i
done
if ($hasUSB); then
mv -v ${work}/*.bz2 ${usb}/
fi
...@@ -6,3 +6,8 @@ if ($hasUSB); then ...@@ -6,3 +6,8 @@ if ($hasUSB); then
datadir=${usb} datadir=${usb}
fi fi
rsync -aPv $datadir/*.bz2 ${remoteUser}@${remoteIP}:~/lago/ rsync -aPv $datadir/*.bz2 ${remoteUser}@${remoteIP}:~/lago/
if (${eraseOldFiles}); then
files=$(find ${work} -iname "*.bz2" -type f -mtime +30)
rm ${files}
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment