1 |
jmc |
1.1 |
#! /usr/bin/env bash |
2 |
|
|
|
3 |
jmc |
1.2 |
# $Header: /u/gcmpack/MITgcm/verification/hs94.cs-32x32x5/input/prepare_run,v 1.1 2006/07/03 02:13:59 jmc Exp $ |
4 |
jmc |
1.1 |
# $Name: $ |
5 |
|
|
|
6 |
|
|
#- in order to save disc space, take files: |
7 |
|
|
fileList="tile001.mitgrid tile002.mitgrid tile003.mitgrid tile004.mitgrid tile005.mitgrid tile006.mitgrid" |
8 |
|
|
#- from this dir: |
9 |
jmc |
1.2 |
fromDir="../../aim.5l_cs/input" |
10 |
jmc |
1.1 |
|
11 |
|
|
#- and do a symbolic link in the current directory |
12 |
|
|
# (if the file does not already exist) |
13 |
|
|
if test -d $fromDir ; then |
14 |
|
|
lnkList='files:' |
15 |
|
|
for xx in $fileList |
16 |
|
|
do |
17 |
|
|
if test -r ${fromDir}/$xx ; then |
18 |
|
|
if test ! -r $xx ; then |
19 |
|
|
lnkList=${lnkList}" "$xx |
20 |
jmc |
1.2 |
ln -sf ${fromDir}/$xx . |
21 |
jmc |
1.1 |
fi |
22 |
|
|
fi |
23 |
|
|
done |
24 |
|
|
echo ' link' $lnkList "from dir:" $fromDir |
25 |
|
|
else |
26 |
|
|
echo " Error:" $fromDir "not a directory" |
27 |
|
|
fi |