Warning, /verification/global_ocean.cs32x15/input.viscA4/prepare_run is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
e6f4278565 Jean*0001 #! /usr/bin/env bash
0002
0003 #- in order to save disc space, un-gzip files
0004 #- from this dir:
0005 fromDir="../input.viscA4"
0006
0007 fileList=`( cd $fromDir ; echo *.gz | sed 's/\.gz//g' )`
0008
0009 #echo 'fileList=' $fileList
0010
88f3b7ad8b Jean*0011 #- copy the gz file in the current directory and unzip
e6f4278565 Jean*0012 # (if the file does not already exist)
0013 if test -d $fromDir ; then
88f3b7ad8b Jean*0014 lnkList=''
e6f4278565 Jean*0015 for xx in $fileList
0016 do
88f3b7ad8b Jean*0017 if test -r ${xx}.gz ; then
0018 if test ! -r $xx -o $xx -ot ${xx}.gz ; then
0019 # file does not exist or is older than compressed version:
e6f4278565 Jean*0020 lnkList=${lnkList}" "$xx
0021 gunzip -f ${xx}.gz
0022 fi
0023 fi
0024 done
88f3b7ad8b Jean*0025 if test "x$lnkList" != 'x' ; then
0026 echo -n " unzip files:$lnkList " ; lnkList=';'
0027 fi
e6f4278565 Jean*0028 #-- a trick to rename pickup by making a symbolic link in the current directory
0029 xx='pickup.0000086400'
0030 yy='pickup.0000072000'
88f3b7ad8b Jean*0031 if test ! -r $xx ; then
0032 lnkList="$lnkList +link $yy to $xx"
e6f4278565 Jean*0033 ln -sf $yy $xx
0034 fi
88f3b7ad8b Jean*0035 echo "$lnkList"
e6f4278565 Jean*0036 #------
0037 else
0038 echo " Error:" $fromDir "not a directory"
0039 fi