#! /usr/bin/env bash # $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/verification_other/global_oce_llc90/input/prepare_run,v 1.12 2017/03/03 17:40:10 gforget Exp $ # $Name: $ dirList="../input ../input_fields ../input_verifs/llc90 ../input_verifs/llc90_fields ../input_verifs/llc90_runoff ../input_verifs/core2_cnyf" for fromDir in $dirList do #- and do a symbolic link in the current directory # (if the file does not already exist) if test -d $fromDir ; then fileList=`( cd $fromDir ; ls -1 )` lnkList='files:' for xx in $fileList do if test -r ${fromDir}/$xx ; then if test ! -r $xx ; then lnkList=${lnkList}" "$xx ln -sf ${fromDir}/$xx . fi fi done echo ' link' $lnkList "from dir:" $fromDir else echo " Error:" $fromDir "not a directory" fi done