2016-06-10 05:05:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
script_dir=$( cd $(dirname $0) ; pwd -P |sed 's@^\(.*\)/scripts.*@\1/scripts@')
|
|
|
|
basedir=`pwd`
|
|
|
|
|
2016-06-10 06:28:20 +00:00
|
|
|
if [[ -x $script_dir/../bin/interpolation_fix ]]
|
2016-06-10 05:05:29 +00:00
|
|
|
then
|
|
|
|
echo "Binary available. Proceeding."
|
|
|
|
else
|
|
|
|
echo "Binary unavailable. Exiting."
|
|
|
|
exit 9
|
|
|
|
fi
|
|
|
|
|
|
|
|
for fortfile in $@
|
|
|
|
do
|
|
|
|
if [[ -e $(basename $fortfile) ]]
|
|
|
|
then
|
|
|
|
mkdir -p uninterpolated
|
|
|
|
mv $fortfile uninterpolated
|
2016-06-10 06:28:20 +00:00
|
|
|
$script_dir/../bin/interpolation_fix uninterpolated/$(basename $fortfile) $fortfile
|
2016-06-10 05:05:29 +00:00
|
|
|
else
|
2016-06-10 06:28:20 +00:00
|
|
|
$script_dir/../bin/interpolation_fix $fortfile $(basename $fortfile)
|
2016-06-10 05:05:29 +00:00
|
|
|
fi
|
2016-06-10 06:28:20 +00:00
|
|
|
echo ""
|
|
|
|
done
|
2016-06-10 05:05:29 +00:00
|
|
|
exit 0
|