Commit ec4ed96a authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

much more clear with gen_options.sh and define_options_*.sh

parent 3416f656
suffix=_bwd
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/LDIRECT=/c\ LDIRECT= -1,' $options_new/COMMAND
sed -i '/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1,' $options_new/COMMAND
sed -i '/IOUT=/c\ IOUT= 1,' $options_new/COMMAND #should not be needed
suffix=_bwd5
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/LDIRECT=/c\ LDIRECT= -1,' $options_new/COMMAND
sed -i '/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1,' $options_new/COMMAND
sed -i '/IOUT=/c\ IOUT= 5,' $options_new/COMMAND
suffix=_bwd_nc
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/LDIRECT=/c\ LDIRECT= -1,' $options_new/COMMAND
sed -i '/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1,' $options_new/COMMAND
sed -i '/IOUT=/c\ IOUT= 9,' $options_new/COMMAND
suffix=
options_new=options$suffix
cp -r $options_template $options_new
# gen_options.sh defines options_template
#E: unit indices
## forward
#E1: ind 1 2
suffix=_ind_1_2
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IND_RECEPTOR=/c\ IND_RECEPTOR= 2,' $options_new/COMMAND
#E2: ind 2 1
suffix=_ind_2_1
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/IND_SOURCE=/c\ IND_SOURCE= 2," $options_new/COMMAND
#E3: ind 2 2
suffix=_ind_2_2
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/IND_SOURCE=/c\ IND_SOURCE= 2," $options_new/COMMAND
sed -i "/IND_RECEPTOR=/c\ IND_RECEPTOR= 2," $options_new/COMMAND
#E: unit indices
## forward
#E1: ind 1 2
suffix=_ind_1_2
options_new=options$suffix
cp -r options $options_new
sed -i '/IND_RECEPTOR=/c\ IND_RECEPTOR= 2,' $options_new/COMMAND
#E2: ind 2 1
suffix=_ind_2_1
options_new=options$suffix
cp -r options $options_new
sed -i "/IND_SOURCE=/c\ IND_SOURCE= 2," $options_new/COMMAND
#E3: ind 2 2
suffix=_ind_2_2
options_new=options$suffix
cp -r options $options_new
sed -i "/IND_SOURCE=/c\ IND_SOURCE= 2," $options_new/COMMAND
sed -i "/IND_RECEPTOR=/c\ IND_RECEPTOR= 2," $options_new/COMMAND
#!/bin/bash
# runs the definitions $define_options with template $options_template
# options_template is a working options dir, by default from the repo HEAD
# $define_options must contain a suffix (empty for default) and sed substitutions
define_options_default=define_options_default.sh
#define_options=${1:-$define_options_default}
define_options=${1:-$define_options_default}
#template is in 1 or defalt here
options_template_default=~/repos/flexpart/options
options_template=${2:-$options_template_default}
#define options contains $options_template
source $define_options
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment