sgml-common-quotes.patch 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --- sgml-common-0.6.3/bin/install-catalog.in.quotes Mon Nov 5 11:19:23 2001
  2. +++ sgml-common-0.6.3/bin/install-catalog.in Mon Nov 5 11:20:12 2001
  3. @@ -39,8 +39,8 @@
  4. # Process actions
  5. case $1 in
  6. -a|--add) SGML_ACTION="addition"
  7. - SGML_CENTRALIZED=$2
  8. - SGML_ORDINARY=$3
  9. + SGML_CENTRALIZED="$2"
  10. + SGML_ORDINARY="$3"
  11. ;;
  12. -r|--remove) if [ -z "$3" -o "$3" = "--version" ]
  13. then
  14. @@ -48,8 +48,8 @@
  15. exit 0
  16. fi
  17. SGML_ACTION="removal"
  18. - SGML_CENTRALIZED=$2
  19. - SGML_ORDINARY=$3
  20. + SGML_CENTRALIZED="$2"
  21. + SGML_ORDINARY="$3"
  22. ;;
  23. -h|--help) echo -e $SGML_HELP_MESSAGE
  24. exit 0
  25. @@ -96,14 +96,14 @@
  26. fi
  27. case $SGML_ACTION in
  28. addition)
  29. - if [ -e $SGML_CENTRALIZED -a ! -w $SGML_CENTRALIZED ]
  30. + if [ -e "$SGML_CENTRALIZED" -a ! -w "$SGML_CENTRALIZED" ]
  31. then
  32. echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2
  33. exit 2
  34. fi
  35. ;;
  36. removal)
  37. - if [ ! -w $SGML_CENTRALIZED ]
  38. + if [ ! -w "$SGML_CENTRALIZED" ]
  39. then
  40. echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2
  41. exit 2
  42. @@ -119,7 +119,7 @@
  43. fi
  44. case $SGML_ACTION in
  45. addition)
  46. - if [ ! -s $SGML_ORDINARY ]
  47. + if [ ! -s "$SGML_ORDINARY" ]
  48. then
  49. echo "`basename $0`: \"$SGML_ORDINARY\" does not exist or is empty." >&2
  50. exit 2
  51. @@ -131,33 +131,33 @@
  52. case $SGML_ACTION in
  53. addition)
  54. echo "`basename $0`: addition of $SGML_ORDINARY in $SGML_CENTRALIZED"
  55. - if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null
  56. + if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null
  57. then
  58. echo "Warning: $SGML_ORDINARY is already installed in the centralized catalog $SGML_CENTRALIZED" >&2
  59. else
  60. - echo "$SGML_POINTER $SGML_ORDINARY" >> $SGML_CENTRALIZED
  61. + echo "$SGML_POINTER \"$SGML_ORDINARY\"" >> "$SGML_CENTRALIZED"
  62. fi
  63. - grep -q $SGML_CENTRALIZED /etc/sgml/catalog 2>/dev/null
  64. + grep -q "$SGML_CENTRALIZED" /etc/sgml/catalog 2>/dev/null
  65. if [ $? -ne 0 ]
  66. then
  67. echo "`basename $0`: addition of $SGML_CENTRALIZED in /etc/sgml/catalog"
  68. - echo "$SGML_POINTER $SGML_CENTRALIZED" >> /etc/sgml/catalog
  69. + echo "$SGML_POINTER \"$SGML_CENTRALIZED\"" >> /etc/sgml/catalog
  70. fi
  71. ;;
  72. removal)
  73. echo "`basename $0`: removal of $SGML_ORDINARY from $SGML_CENTRALIZED"
  74. - if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null
  75. + if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null
  76. then
  77. - sed -e "\:$SGML_POINTER $SGML_ORDINARY:d" < $SGML_CENTRALIZED > ${SGML_CENTRALIZED}.new
  78. - mv ${SGML_CENTRALIZED}.new $SGML_CENTRALIZED
  79. + sed -e "\:$SGML_POINTER \"\\?$SGML_ORDINARY\"\\?:d" < "$SGML_CENTRALIZED" > "${SGML_CENTRALIZED}.new"
  80. + mv "${SGML_CENTRALIZED}.new" "$SGML_CENTRALIZED"
  81. else
  82. echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2
  83. fi
  84. - if [ ! -s $SGML_CENTRALIZED ]
  85. + if [ ! -s "$SGML_CENTRALIZED" ]
  86. then
  87. - rm $SGML_CENTRALIZED
  88. + rm "$SGML_CENTRALIZED"
  89. echo "`basename $0`: removal of $SGML_CENTRALIZED from /etc/sgml/catalog"
  90. - sed -e "\:$SGML_POINTER $SGML_CENTRALIZED:d" < /etc/sgml/catalog > /etc/sgml/catalog.new
  91. + sed -e "\:$SGML_POINTER \"\\?$SGML_CENTRALIZED\"\\?:d" < /etc/sgml/catalog > /etc/sgml/catalog.new
  92. mv /etc/sgml/catalog.new /etc/sgml/catalog
  93. fi
  94. ;;