source:
utils/build/mk_ENHANCE-03_domcfg/Ffetch_extdir.sh
@
11985
Last change on this file since 11985 was 4990, checked in by timgraham, 10 years ago | |
---|---|
|
|
File size: 896 bytes |
Line | |
---|---|
1 | #!/bin/bash |
2 | #set -x |
3 | set -o posix |
4 | #set -u |
5 | #set -e |
6 | #+ |
7 | # =============== |
8 | # Ffetch_extdir.sh |
9 | # =============== |
10 | # --------------- |
11 | # Make the config |
12 | # --------------- |
13 | # SYNOPSIS |
14 | # ======== |
15 | # :: |
16 | # $ Ffetch_extdir.sh |
17 | # DESCRIPTION |
18 | # =========== |
19 | # - Make the config directory |
20 | # - Create repositories needed : |
21 | # |
22 | # - EXP00 for namelist |
23 | # - MY_SRC for user sources |
24 | # - BLD for compilation |
25 | # EXAMPLES |
26 | # ======== |
27 | # :: |
28 | # $ ./Ffetch_extdir.sh CONFIG_NAME REMOTE_CTL |
29 | # TODO |
30 | # ==== |
31 | # option debug |
32 | # EVOLUTIONS |
33 | # ========== |
34 | # $Id: Ffetch_extdir.sh 3715 2012-11-28 16:06:02Z acc $ |
35 | # * creation |
36 | #- |
37 | basedir=$(pwd) |
38 | cd ${1} |
39 | wget ${2} -O remote_file.list |
40 | # |
41 | if [ -f remote_file.list ] ; then |
42 | cat remote_file.list | grep -v '^#' | |
43 | while |
44 | read remfile locfile |
45 | do |
46 | if [ $remfile == 'create_directory' ] ;then |
47 | mkdir $locfile |
48 | else |
49 | wget $remfile -O $locfile |
50 | fi |
51 | done |
52 | fi |
53 | cd $basedir |
Note: See TracBrowser
for help on using the repository browser.