source:
branches/dev_001_SBC/VALID/get_nemo
@
1251
Last change on this file since 1251 was 697, checked in by ctlod, 17 years ago | |
---|---|
|
|
File size: 771 bytes |
Line | |
---|---|
1 | #!/bin/ksh |
2 | ###################################################### |
3 | # Author : Rachid benshila for ESOPA |
4 | # Contact : opatlod@lodyc.jussieu.fr |
5 | # |
6 | # This script to copy a file from NEMO in the current |
7 | # directory |
8 | # |
9 | ###################################################### |
10 | d_n=$(dirname $0); b_n=$(basename $0); |
11 | d_file=$(dirname $1);b_file=$(basename $1); |
12 | |
13 | nemo_file=`find ${d_n}/../../modeles/NEMO/${d_file} -name ${b_file}` |
14 | set -A nemo_tab $nemo_file |
15 | |
16 | if [ ${#nemo_tab[*]} -gt 1 ] ; then |
17 | echo 'Multiple occurence found' |
18 | echo ${nemo_tab[*]} |
19 | echo 'Please specify one directory' |
20 | exit |
21 | fi |
22 | if [ ${#nemo_tab[*]} -eq 0 ] ; then |
23 | echo 'No occurence found' |
24 | echo 'exiting' |
25 | exit |
26 | fi |
27 | if [ ${#nemo_tab[*]} -eq 1 ] ; then |
28 | \cp ${nemo_file} . |
29 | fi |
30 | |
31 | unset d_n |
32 | unset b_n |
33 | unset d_file |
34 | unset b_file |
Note: See TracBrowser
for help on using the repository browser.