IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2023, 8:18:25 AM (3 years ago)
Author:
eugene
Message:

allow long-running jobs (md5sum) to be remote; fix some error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh

    r42430 r42441  
    11#!/bin/csh
    22
    3 if ($#argv != 2) then
    4   echo "USAGE: get_hosts_md5s.sh (dateobs) (stage)"
     3if ($#argv != 3) then
     4  echo "USAGE: get_hosts_md5s.sh (topdir) (dateobs) (stage)"
    55  exit 2
    66endif
    77
    8 set dirname = $1
    9 set stage   = $2
     8set topdir  = $1
     9set dateobs = $2
     10set stage   = $3
    1011
    11 if (! -d $dirname) then
    12   echo "ERROR: missing dateobs directory $dirname"
     12if (! -d $topdir) then
     13  echo "ERROR: missing top-level directory $topdir"
     14  exit 3
     15endif
     16
     17if (! -d $topdir/$dateobs) then
     18  echo "ERROR: missing dateobs directory $topdir/$dateobs"
    1319  exit 3
    1420endif
    1521
    1622# report both the dateobs and the hostnames
    17 ls $dirname/*.inst.$stage.txt | awk -v dateobs=$dirname -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $2}' | sed s/.inst.$stage.txt//
     23ls $topdir/$dateobs/*.inst.$stage.txt | awk -v dateobs=$dateobs -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $NF}' | sed s/.inst.$stage.txt//
    1824exit 0
Note: See TracChangeset for help on using the changeset viewer.