Browse Source

Fixed install script for case with spaces in PRISM path.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@551 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 18 years ago
parent
commit
db60a6af41
  1. 10
      prism/install.sh

10
prism/install.sh

@ -8,7 +8,7 @@
# You are supposed to run this from the main PRISM directory # You are supposed to run this from the main PRISM directory
# but in case someone is in the bin directory, change... # but in case someone is in the bin directory, change...
PRISM_DIR=`pwd` PRISM_DIR=`pwd`
if [ `basename $PRISM_DIR` = bin ]; then
if [ `basename "$PRISM_DIR"` = bin ]; then
PRISM_DIR=`cd ..;pwd` PRISM_DIR=`cd ..;pwd`
fi fi
@ -19,13 +19,13 @@ fi
TEMP_FILE=tmp TEMP_FILE=tmp
for FILE_TO_CHANGE in bin/prism bin/xprism for FILE_TO_CHANGE in bin/prism bin/xprism
do do
if [ -f $PRISM_DIR/$FILE_TO_CHANGE ]; then
if [ -f "$PRISM_DIR"/$FILE_TO_CHANGE ]; then
if [ ! "$1" = "silent" ] ; then if [ ! "$1" = "silent" ] ; then
echo "Setting path in startup script $PRISM_DIR/$FILE_TO_CHANGE..." echo "Setting path in startup script $PRISM_DIR/$FILE_TO_CHANGE..."
fi fi
if sed -e "s|PRISM_DIR=.*|PRISM_DIR=$PRISM_DIR|g" $PRISM_DIR/$FILE_TO_CHANGE > $PRISM_DIR/$TEMP_FILE ; then
/bin/mv $PRISM_DIR/$TEMP_FILE $PRISM_DIR/$FILE_TO_CHANGE
chmod 755 $PRISM_DIR/$FILE_TO_CHANGE
if sed -e "s|PRISM_DIR=.*|PRISM_DIR=$PRISM_DIR|g" "$PRISM_DIR"/$FILE_TO_CHANGE > "$PRISM_DIR"/$TEMP_FILE ; then
/bin/mv "$PRISM_DIR"/$TEMP_FILE "$PRISM_DIR"/$FILE_TO_CHANGE
chmod 755 "$PRISM_DIR"/$FILE_TO_CHANGE
else else
echo "Error: Failed to modify startup scripts." echo "Error: Failed to modify startup scripts."
exit 0 exit 0

Loading…
Cancel
Save