DAMASK_EICMD/installation/Marc_Mentat2010_mods/apply_MPIE_modifications

58 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
WORKINGDIR=`dirname $0`
INSTALLDIR="/msc"
echo "Input path of MARC/MENTAT installation: [$INSTALLDIR]"
read INSTALLDIR
INSTALLDIR=${INSTALLDIR%/} # remove trailing slash
if [ -z $INSTALLDIR ]; then
INSTALLDIR="/msc"
fi
# tools
echo 'copying Marc tools...'
theDIR=$INSTALLDIR/marc2010/tools
for filename in 'comp_user' \
'comp_user_h' \
'comp_user_mp' \
'run_marc' \
'run_h_marc' \
'run_mp_marc' \
'include_linux64'; do
cp $WORKINGDIR/Marc_tools/$filename $theDIR
echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g"
echo $filename
done
# Mentat scripts
echo 'copying Mentat scripts...'
theDIR=$INSTALLDIR/mentat2010/bin
for filename in 'edit_window' \
'submit1' \
'submit2' \
'submit3'; do
cp $WORKINGDIR/Mentat_bin/$filename $theDIR
echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g"
echo $filename
done
# Mentat scripts
echo 'copying Mentat menus...'
theDIR=$INSTALLDIR/mentat2010/menus
for filename in 'job_run.ms'; do
cp $WORKINGDIR/Mentat_menus/$filename $theDIR
echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g"
echo $filename
done
# compile menus
echo 'compiling menus...'
$INSTALLDIR/mentat2010/bin/mentat -compile $INSTALLDIR/mentat2010/menus/linux64/main.msb
# setting access rights
echo 'setting file access rights...'
chmod 555 $INSTALLDIR/marc2010/tools/run_*_marc
chmod 555 $INSTALLDIR/marc2010/tools/comp_user?*
echo 'done.'