diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-08 13:23:36 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-08 13:23:36 -0800 |
commit | 28c94b78b3b309ed272a137367755de10e8590dd (patch) | |
tree | 4b137cdbb1453076f9218739c98f92f1a64227f9 | |
parent | a6845e5858e1bfec8db7545d62081212458b7588 (diff) | |
download | sgml-skel-28c94b78b3b309ed272a137367755de10e8590dd.tar.gz sgml-skel-28c94b78b3b309ed272a137367755de10e8590dd.tar.bz2 sgml-skel-28c94b78b3b309ed272a137367755de10e8590dd.zip |
regcat
-rwxr-xr-x | sgml-register-catalog.in | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sgml-register-catalog.in b/sgml-register-catalog.in index 80c074a..bfe099b 100755 --- a/sgml-register-catalog.in +++ b/sgml-register-catalog.in @@ -111,7 +111,7 @@ case $SGML_ACTION in # else # echo "$SGML_POINTER $SGML_ORDINARY" >> $SGML_CENTRALIZED # fi - grep -q -e "\<$SGML_ORDINARY\>" /etc/sgml/catalog 2>/dev/null + grep -q -e "$SGML_ORDINARY\"\?[ ]*$" /etc/sgml/catalog 2>/dev/null if [ $? -ne 0 ]; then echo "`basename $0`: addition of $SGML_ORDINARY in /etc/sgml/catalog" echo "$SGML_POINTER \"$SGML_ORDINARY\"" >> /etc/sgml/catalog @@ -126,13 +126,12 @@ case $SGML_ACTION in # else # echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2 # fi - if [ ! -s $SGML_ORDINARY ]; then + # set -x # rm $SGML_ORDINARY - echo "`basename $0`: removal of $SGML_ORDINARY from /etc/sgml/catalog" - sed -e "\:$SGML_POINTER \"\?$SGML_ORDINARY\"\?\>:d" /etc/sgml/catalog \ - > /etc/sgml/catalog.new - mv /etc/sgml/catalog.new /etc/sgml/catalog - fi + echo "`basename $0`: removal of $SGML_ORDINARY from /etc/sgml/catalog" + sed -e "\:$SGML_POINTER \+\"\?$SGML_ORDINARY\"\?[ ]*$:d" /etc/sgml/catalog \ + > /etc/sgml/catalog.new + mv /etc/sgml/catalog.new /etc/sgml/catalog ;; esac |