summaryrefslogtreecommitdiff
blob: 53f2347498441cfb95bbc5bf894e3632d188e147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Author: Ole Streicher <olebole@debian.org>
Description: Use predefined MIDVERS and MIDASHOME in cleanmidas
 Cleanmidas assumes the the parent directory of "15FEBpl1.1" is "midas",
 which is not required in the installation guide.
--- a/system/unix/cleanmidas
+++ b/system/unix/cleanmidas
@@ -54,11 +54,13 @@
         [ $answer = y ]
 }
 
-
 MID_HERE=`pwd`
-MIDVERS=`echo $MID_HERE | sed 's/^.*midas\/\([^\/]*\).*$/\1/'`
-MIDASHOME=`echo $MID_HERE | sed 's/\/'$MIDVERS'.*$//'`
-
+if [ -z "$MIDVERS" ] ; then
+  MIDVERS=`echo $MID_HERE | sed 's/^.*midas\/\([^\/]*\).*$/\1/'`
+fi
+if [ -z "$MIDASHOME" ] ; then
+  MIDASHOME=`echo $MID_HERE | sed 's/\/'$MIDVERS'.*$//'`
+fi
 MID_HOME=$MIDASHOME/$MIDVERS
 
 export MIDASHOME MIDVERS