New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7148 for branches/2016/dev_r6393_NOC_WAD/NEMOGCM/TOOLS/MISCELLANEOUS/make_usp_tar.sh – NEMO

Ignore:
Timestamp:
2016-10-27T17:37:22+02:00 (7 years ago)
Author:
acc
Message:

Branch dev_r6393_NOC_WAD. Tweaks to script for using unsupported configurations on systems without wget access to the internet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6393_NOC_WAD/NEMOGCM/TOOLS/MISCELLANEOUS/make_usp_tar.sh

    r7117 r7148  
    116116       if [ $remfile == 'create_directory' ] ;then 
    117117         mkdir $locfile 
    118          echo $remfile "                 " $locfile >> local.ctl 
     118         echo $remfile "                 " $locfile >> local_template.ctl 
    119119       else 
    120120         wget $remfile -O $locfile 
    121121         remfile=$(echo $remfile | sed -e "s;.*$locfile;SET_LOCAL_DIRECTORY_HERE/$locfile;") 
    122          echo $remfile "  " $locfile >> local.ctl 
     122         echo $remfile "  " $locfile >> local_template.ctl 
    123123       fi 
    124124      done 
     
    134134#---------------------------------------------------------------- 
    135135# 
    136    grep -v "$2 " $1 >  uspcfg_local.txt 
     136   grep -v "$2 " $1 >  uspcfg_local_template.txt 
    137137# 
    138138#---------------------------------------------------------------- 
     
    140140#---------------------------------------------------------------- 
    141141# 
    142    cat cfg.tmp | sed -e "s;http.*$;SET_LOCAL_DIRECTORY_HERE/local.ctl;" >> uspcfg_local.txt 
     142   cat cfg.tmp | sed -e "s;http.*$;SET_LOCAL_DIRECTORY_HERE/local.ctl;" >> uspcfg_local_template.txt 
    143143# 
    144144# 
     
    161161# Edit the local.ctl file to set the local directory path 
    162162# 
    163    ed - local.ctl << EOFA 
    164 g/SET_LOCAL_DIRECTORY_HERE/s;SET_LOCAL_DIRECTORY_HERE;\$basedir; 
    165 w 
    166 q 
    167 EOFA 
     163   sed -e "s;SET_LOCAL_DIRECTORY_HERE;\$basedir;" local_template.ctl > local.ctl 
    168164# 
    169165# Edit the uspcfg_local.txt file to set the local directory path 
    170166# 
    171    ed - uspcfg_local.txt << EOFB 
    172 /SET_LOCAL_DIRECTORY_HERE/s;SET_LOCAL_DIRECTORY_HERE;\$basedir; 
    173 w 
    174 q 
    175 EOFB 
     167   sed -e "s;SET_LOCAL_DIRECTORY_HERE;\$basedir;" uspcfg_local_template.txt > uspcfg_local.txt 
     168# 
     169# Install local versions in the named CONFIG directory 
     170# 
    176171   if [ -f \$confdir/uspcfg.txt ] && [ ! -L \$confdir/uspcfg.txt ]; then 
    177172    mv \$confdir/uspcfg.txt \$confdir/uspcfg_remote.txt 
     
    196191   fi 
    197192} 
     193export -f wget 
    198194EOF 
    199195#---------------------------------------------------------------- 
     
    217213   fi 
    218214} 
     215export -f wget 
    219216EOFC 
    220217#---------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.