source: cows_wps/trunk/create_process.sh @ 6105

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

script to create config and process modules from template

  • 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
8new_module=process_modules/${mod_name}.py
9new_config=process_configs/${class_name}.ini
10
11module_template=process_modules/process_template.py
12config_template=process_configs/ConfigTemplate.ini
13
14cp $module_template $new_module
15cp $config_template $new_config
16
17perl -p -i -w -e 's/process_template/'$mod_name'/g; s/ProcessTemplate/'$class_name'/g;' $new_module $new_config
18
19echo "Wrote new process module: $new_module"
20echo "Wrote new process config: $new_config"
Note: See TracBrowser for help on using the repository browser.