Fixed a bug in msr2data which affected the msr-file generation if the fit template was equal to one of the target files
This commit is contained in:
parent
19e8e180a9
commit
c31c4c6c87
10
src/external/scripts/msr2data
vendored
10
src/external/scripts/msr2data
vendored
@ -80,7 +80,8 @@ EOFHELP
|
|||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
export PATH=./:$PATH
|
PATH=./:$PATH
|
||||||
|
LC_NUMERIC=en_US.UTF-8
|
||||||
|
|
||||||
SUMMDIR="/mnt/data/nemu/summ"
|
SUMMDIR="/mnt/data/nemu/summ"
|
||||||
|
|
||||||
@ -260,7 +261,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# if it's the first run to be fitted, take the template and substitute the runnumber to match the first run
|
# if it's the first run to be fitted, take the template and substitute the runnumber to match the first run
|
||||||
if [ "$q" -eq 0 ]; then
|
if [ "$q" -eq 0 ] && [ "$TEMPLATE" != "$FIRSTINPUT" ]; then
|
||||||
awk -v count=$TEMP -v nextcount=${RUNARRAY[0]} -v nextinput=$FIRSTINPUT '{
|
awk -v count=$TEMP -v nextcount=${RUNARRAY[0]} -v nextinput=$FIRSTINPUT '{
|
||||||
if(NR==1) print nextcount > nextinput
|
if(NR==1) print nextcount > nextinput
|
||||||
else if($1 == "RUN") {
|
else if($1 == "RUN") {
|
||||||
@ -300,6 +301,7 @@ else
|
|||||||
COUNTX=$COUNT
|
COUNTX=$COUNT
|
||||||
TEMPLATEX=$COUNT$EXTENSION.$OUTPUTEXT
|
TEMPLATEX=$COUNT$EXTENSION.$OUTPUTEXT
|
||||||
fi
|
fi
|
||||||
|
if [ "$TEMPLATEX" != "$NEXTINPUT" ]; then
|
||||||
awk -v count=$COUNTX -v nextcount=$NEXTCOUNT -v nextinput=$NEXTINPUT '{
|
awk -v count=$COUNTX -v nextcount=$NEXTCOUNT -v nextinput=$NEXTINPUT '{
|
||||||
if(NR==1) print nextcount > nextinput
|
if(NR==1) print nextcount > nextinput
|
||||||
else if($1 == "RUN") {
|
else if($1 == "RUN") {
|
||||||
@ -317,6 +319,7 @@ else
|
|||||||
}' $TEMPLATEX
|
}' $TEMPLATEX
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -r $COUNT$EXTENSION.$OUTPUTEXT ]; then
|
if [ ! -r $COUNT$EXTENSION.$OUTPUTEXT ]; then
|
||||||
echo
|
echo
|
||||||
@ -420,6 +423,9 @@ else
|
|||||||
# put together all data to db- or column-format and write it to the file
|
# put together all data to db- or column-format and write it to the file
|
||||||
awk -v outfile=$OUTFILE -v noheader=$NOHEADER -v runList=$RUNLIST_USED -v numIndVar=$NUM_OF_IND_VAR -v format=$FORMAT '{
|
awk -v outfile=$OUTFILE -v noheader=$NOHEADER -v runList=$RUNLIST_USED -v numIndVar=$NUM_OF_IND_VAR -v format=$FORMAT '{
|
||||||
|
|
||||||
|
if(tolower(outfile) == "none")
|
||||||
|
exit 0
|
||||||
|
|
||||||
FS = " "
|
FS = " "
|
||||||
OFS = " "
|
OFS = " "
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user