now checks file "processing/MSCpath" for predefined installdir.

now checks validity of user-specified install version.
This commit is contained in:
Philip Eisenlohr 2011-10-20 16:13:38 +00:00
parent 414bacb096
commit 9565852247
1 changed files with 28 additions and 13 deletions

View File

@ -1,20 +1,35 @@
#!/bin/bash #!/bin/bash
WORKINGDIR=`dirname $0` DEFAULT_INSTALLDIR='/msc'
VERSION="2010.2" DEFAULT_VERSION='2010.2'
echo "Input version of MARC/MENTAT installation: [$VERSION]"
read VERSION
if [ -z $VERSION ]; then
VERSION="2010.2"
fi
INSTALLDIR="/msc" WORKINGDIR=`dirname $0`
echo "Input path of MARC/MENTAT installation: [$INSTALLDIR]"
read INSTALLDIR while [ ! -d "$WORKINGDIR/$VERSION" ] || [ -z "$VERSION" ]
INSTALLDIR=${INSTALLDIR%/} # remove trailing slash do
if [ -z $INSTALLDIR ]; then echo "Input version of MARC/MENTAT installation: [${DEFAULT_VERSION}]"
INSTALLDIR="/msc" read VERSION
if [ -z "$VERSION" ]; then
VERSION=${DEFAULT_VERSION}
fi fi
done
echo "MSC version: $VERSION"
INSTALLDIR=''
if [ -f $WORKINGDIR/../../processing/MSCpath ]; then
INSTALLDIR=`head $WORKINGDIR/../../processing/MSCpath`
fi
while [ ! -d "$INSTALLDIR" ] || [ -z "$INSTALLDIR" ]
do
echo "Input path of MARC/MENTAT installation: [${DEFAULT_INSTALLDIR}]"
read INSTALLDIR
if [ -z $INSTALLDIR ]; then
INSTALLDIR=${DEFAULT_INSTALLDIR}
fi
done
INSTALLDIR=${INSTALLDIR%/} # remove trailing slash
echo "MSC installation path: $INSTALLDIR"
# tools # tools
echo '' echo ''