--- sgml-common-0.6.3/bin/install-catalog.in.quotes	Mon Nov  5 11:19:23 2001
+++ sgml-common-0.6.3/bin/install-catalog.in	Mon Nov  5 11:20:12 2001
@@ -39,8 +39,8 @@
 # Process actions
 case $1 in
    -a|--add)    SGML_ACTION="addition"
-		SGML_CENTRALIZED=$2
-		SGML_ORDINARY=$3
+		SGML_CENTRALIZED="$2"
+		SGML_ORDINARY="$3"
 		;;
    -r|--remove)	if [ -z "$3" -o "$3" = "--version" ]
 		then
@@ -48,8 +48,8 @@
 		  exit 0
 		fi
    		SGML_ACTION="removal"
-		SGML_CENTRALIZED=$2
-		SGML_ORDINARY=$3
+		SGML_CENTRALIZED="$2"
+		SGML_ORDINARY="$3"
 		;;
    -h|--help)	echo -e $SGML_HELP_MESSAGE
 		exit 0
@@ -96,14 +96,14 @@
 fi
 case $SGML_ACTION in
    addition)
-	if [ -e $SGML_CENTRALIZED -a ! -w $SGML_CENTRALIZED ]
+	if [ -e "$SGML_CENTRALIZED" -a ! -w "$SGML_CENTRALIZED" ]
 	then
 	  echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2
 	  exit 2
 	fi
 	;;
    removal)
-	if [ ! -w $SGML_CENTRALIZED ]
+	if [ ! -w "$SGML_CENTRALIZED" ]
 	then
 	  echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2
 	  exit 2
@@ -119,7 +119,7 @@
 fi
 case $SGML_ACTION in
    addition)
-	if [ ! -s $SGML_ORDINARY ]
+	if [ ! -s "$SGML_ORDINARY" ]
 	then
 	  echo "`basename $0`: \"$SGML_ORDINARY\" does not exist or is empty." >&2
 	  exit 2
@@ -131,33 +131,33 @@
 case $SGML_ACTION in
     addition)
 	echo "`basename $0`: addition of $SGML_ORDINARY in $SGML_CENTRALIZED"
-	if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null
+	if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null
 	then
 	  echo "Warning: $SGML_ORDINARY is already installed in the centralized catalog $SGML_CENTRALIZED" >&2
 	else
-	  echo "$SGML_POINTER $SGML_ORDINARY" >> $SGML_CENTRALIZED
+	  echo "$SGML_POINTER \"$SGML_ORDINARY\"" >> "$SGML_CENTRALIZED"
 	fi
-	grep -q $SGML_CENTRALIZED /etc/sgml/catalog 2>/dev/null
+	grep -q "$SGML_CENTRALIZED" /etc/sgml/catalog 2>/dev/null
 	if [ $? -ne 0 ]
 	then
 	  echo "`basename $0`: addition of $SGML_CENTRALIZED in /etc/sgml/catalog"
-	  echo "$SGML_POINTER $SGML_CENTRALIZED" >> /etc/sgml/catalog
+	  echo "$SGML_POINTER \"$SGML_CENTRALIZED\"" >> /etc/sgml/catalog
 	fi
 	;;
    removal)
 	echo "`basename $0`: removal of $SGML_ORDINARY from $SGML_CENTRALIZED"
-	if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null
+	if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null
 	then
-          sed -e "\:$SGML_POINTER $SGML_ORDINARY:d" < $SGML_CENTRALIZED > ${SGML_CENTRALIZED}.new
-          mv ${SGML_CENTRALIZED}.new $SGML_CENTRALIZED
+          sed -e "\:$SGML_POINTER \"\\?$SGML_ORDINARY\"\\?:d" < "$SGML_CENTRALIZED" > "${SGML_CENTRALIZED}.new"
+          mv "${SGML_CENTRALIZED}.new" "$SGML_CENTRALIZED"
 	else
 	  echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2
 	fi
-	if [ ! -s $SGML_CENTRALIZED ]
+	if [ ! -s "$SGML_CENTRALIZED" ]
 	then
-	  rm $SGML_CENTRALIZED
+	  rm "$SGML_CENTRALIZED"
 	  echo "`basename $0`: removal of $SGML_CENTRALIZED from /etc/sgml/catalog"
-          sed -e "\:$SGML_POINTER $SGML_CENTRALIZED:d" < /etc/sgml/catalog > /etc/sgml/catalog.new
+          sed -e "\:$SGML_POINTER \"\\?$SGML_CENTRALIZED\"\\?:d" < /etc/sgml/catalog > /etc/sgml/catalog.new
           mv /etc/sgml/catalog.new /etc/sgml/catalog
 	fi
 	;;
