/[MITgcm]/MITgcm_contrib/test_scripts/svante/backup_outp
ViewVC logotype

Contents of /MITgcm_contrib/test_scripts/svante/backup_outp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Nov 6 13:35:01 2023 UTC (20 months, 1 week ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Add new script to make tar file of output-dir results and
save this backup file after testreport and restart test.

1 #! /usr/bin/env bash
2
3 # $Header: $
4 # $Name: $
5
6 if test $# = 2 ; then
7 pFixDir=$1 ; bakDir=$2
8 else
9 echo 'Usage: '`basename $0`' {pFixDir} {bakDir}'
10 echo ' Make a tar file of testreport/restart output dir, named with prefix "{pFixDir}"'
11 echo ' and save it to existing dir "{bakDir}"'
12 echo ' Note: to use where testreport/restart is run (i.e., in verification/)'
13 exit 1
14 fi
15
16 dOutp=`ls -t ${pFixDir}_20*/summary.txt | head -n 1 | sed 's/\/summary.txt//'`
17 if test "x$dOutp" != x -a -d $bakDir ; then
18 echo " - saving tar file of output-dir '${dOutp}' in '${bakDir}'"
19 tar -cf $dOutp.tar $dOutp ; mv $dOutp.tar $bakDir
20 else
21 if test "x$dOutp" = x ; then
22 echo " - no output-dir to save"
23 else
24 echo " - backup-dir '${bakDir}' not found"
25 fi
26 exit 2
27 fi

  ViewVC Help
Powered by ViewVC 1.1.22