1 |
jmc |
1.2 |
#! /usr/bin/env bash |
2 |
jmc |
1.1 |
|
3 |
jmc |
1.2 |
# $Header: /u/gcmpack/MITgcm/verification/hs94.cs-32x32x5/input/prepare_run,v 1.2 2006/07/15 23:22:00 jmc Exp $ |
4 |
|
|
# $Name: $ |
5 |
|
|
|
6 |
|
|
#- in order to save disc space, from this dir: |
7 |
|
|
fromDir="../../global_ocean.cs32x15/input" |
8 |
|
|
# link files: |
9 |
|
|
fileList=`(cd $fromDir ; ls *.bin)` |
10 |
|
|
|
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 |
|
|
ln -sf ${fromDir}/$xx . |
21 |
|
|
fi |
22 |
|
|
fi |
23 |
|
|
done |
24 |
|
|
echo ' link' $lnkList "from dir:" $fromDir |
25 |
|
|
else |
26 |
|
|
echo " Error:" $fromDir "not a directory" |
27 |
|
|
fi |
28 |
|
|
|
29 |
|
|
#- in order to save disc space, from this dir: |
30 |
|
|
fromDir='../../tutorial_held_suarez_cs/input' |
31 |
|
|
# link files: |
32 |
|
|
fileList=`(cd $fromDir ; ls *.face00?.bin)` |
33 |
|
|
|
34 |
|
|
#- and do a symbolic link in the current directory |
35 |
|
|
# (if the file does not already exist) |
36 |
|
|
if test -d $fromDir ; then |
37 |
|
|
lnkList='files:' |
38 |
|
|
for xx in $fileList |
39 |
|
|
do |
40 |
|
|
if test -r ${fromDir}/$xx ; then |
41 |
|
|
if test ! -r $xx ; then |
42 |
|
|
lnkList=${lnkList}" "$xx |
43 |
|
|
ln -sf ${fromDir}/$xx . |
44 |
|
|
fi |
45 |
|
|
fi |
46 |
|
|
done |
47 |
|
|
echo ' link' $lnkList "from dir:" $fromDir |
48 |
|
|
else |
49 |
|
|
echo " Error:" $fromDir "not a directory" |
50 |
|
|
fi |
51 |
jmc |
1.1 |
echo '' |