source: cows_wps/trunk/create_process.sh @ 7329

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows_wps/trunk/create_process.sh@7329
Revision 7329, 726 bytes checked in by astephen, 10 years ago (diff)

Created new process that subsets pp files. Needs time and level and
forecast time added to the filtering. Then it also needs a clever way of
using the outputs of one process to populate the UI contents for another
process.

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3# create_process.sh <mod_name> <class_name>
4
5mod_name=$1
6class_name=$2
7
8if [ ! $mod_name ]; then
9        echo "Please provide module name as first argument."
10        exit
11fi
12
13if [ ! $class_name ]; then
14        echo "Please provide class name as second argument."
15        exit
16fi
17
18new_module=process_modules/${mod_name}.py
19new_config=process_configs/${class_name}.ini
20
21module_template=process_modules/process_template.py
22config_template=process_configs/ConfigTemplate.ini
23
24cp $module_template $new_module
25cp $config_template $new_config
26
27perl -p -i -w -e 's/process_template/'$mod_name'/g; s/ProcessTemplate/'$class_name'/g;' $new_module $new_config
28
29echo "Wrote new process module: $new_module"
30echo "Wrote new process config: $new_config"
Note: See TracBrowser for help on using the repository browser.