From db60a6af416d975885cd54f34eeda94117be1cf3 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Tue, 18 Dec 2007 07:55:03 +0000 Subject: [PATCH] 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 --- prism/install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prism/install.sh b/prism/install.sh index 216f3533..a8027a29 100755 --- a/prism/install.sh +++ b/prism/install.sh @@ -8,7 +8,7 @@ # You are supposed to run this from the main PRISM directory # but in case someone is in the bin directory, change... PRISM_DIR=`pwd` -if [ `basename $PRISM_DIR` = bin ]; then +if [ `basename "$PRISM_DIR"` = bin ]; then PRISM_DIR=`cd ..;pwd` fi @@ -19,13 +19,13 @@ fi TEMP_FILE=tmp for FILE_TO_CHANGE in bin/prism bin/xprism do - if [ -f $PRISM_DIR/$FILE_TO_CHANGE ]; then + if [ -f "$PRISM_DIR"/$FILE_TO_CHANGE ]; then if [ ! "$1" = "silent" ] ; then echo "Setting path in startup script $PRISM_DIR/$FILE_TO_CHANGE..." 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 echo "Error: Failed to modify startup scripts." exit 0