reworked verbosity and structure of installation script

This commit is contained in:
Philip Eisenlohr 2010-07-30 19:39:54 +00:00
parent 60decea760
commit c7e5cb9806
1 changed files with 39 additions and 13 deletions

View File

@ -4,21 +4,47 @@ WORKINGDIR=`dirname $0`
INSTALLDIR="/msc"
echo "Input path of MARC/MENTAT installation: [$INSTALLDIR]"
read INSTALLDIR
if [ $INSTALLDIR = ""] ; then
if [ -z $INSTALLDIR ]; then
INSTALLDIR="/msc"
fi
cp $WORKINGDIR/Marc_tools/comp_user $INSTALLDIR/marc2010/tools
cp $WORKINGDIR/Marc_tools/comp_user_h $INSTALLDIR/marc2010/tools
cp $WORKINGDIR/Marc_tools/comp_user_mp $INSTALLDIR/marc2010/tools
cp $WORKINGDIR/Marc_tools/run_marc $INSTALLDIR/marc2010/tools
cp $WORKINGDIR/Marc_tools/run_h_marc $INSTALLDIR/marc2010/tools
cp $WORKINGDIR/Marc_tools/run_mp_marc $INSTALLDIR/marc2010/tools
cp $WORKINGDIR/Marc_tools/include_linux64 $INSTALLDIR/marc2010/tools
cp $WORKINGDIR/Mentat_bin/edit_window $INSTALLDIR/mentat2010/bin
cp $WORKINGDIR/Mentat_bin/submit1 $INSTALLDIR/mentat2010/bin
cp $WORKINGDIR/Mentat_bin/submit2 $INSTALLDIR/mentat2010/bin
cp $WORKINGDIR/Mentat_bin/submit3 $INSTALLDIR/mentat2010/bin
cp $WORKINGDIR/Mentat_menus/job_run.ms $INSTALLDIR/mentat2010/menus
# tools
echo 'copying Marc tools...'
for filename in 'comp_user' \
'comp_user_h' \
'comp_user_mp' \
'run_marc' \
'run_h_marc' \
'run_mp_marc' \
'include_linux_64'; do
cp $WORKINGDIR/Marc_tools/$filename $INSTALLDIR/marc2010/tools
echo $filename
done
# Mentat scripts
echo 'copying Mentat scripts...'
for filename in 'edit_window' \
'submit1' \
'submit2' \
'submit3'; do
cp $WORKINGDIR/Mentat_bin/$filename $INSTALLDIR/mentat2010/bin
echo $filename
done
# Mentat scripts
echo 'copying Mentat menus...'
for filename in 'job_run.ms'; do
cp $WORKINGDIR/Mentat_menus/$filename $INSTALLDIR/mentat2010/menus
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.'