1 |
#! /usr/bin/env bash |
2 |
|
3 |
# $Header: $ |
4 |
# $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 |
fromDir="../../global_ocean.cs32x15/input" |
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 -s ${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 |