diff options
author | shige <shige@FreeBSD.org> | 2000-10-27 22:21:57 +0800 |
---|---|---|
committer | shige <shige@FreeBSD.org> | 2000-10-27 22:21:57 +0800 |
commit | 0784116dceb153d542a6aecfca206b707e470b0f (patch) | |
tree | babaf4865fc052a223952577cedb596a0659c96b /textproc | |
parent | 4bfb4b0cda7ff9b68163838331c07e82dd6cc424 (diff) | |
download | freebsd-ports-gnome-0784116dceb153d542a6aecfca206b707e470b0f.tar.gz freebsd-ports-gnome-0784116dceb153d542a6aecfca206b707e470b0f.tar.zst freebsd-ports-gnome-0784116dceb153d542a6aecfca206b707e470b0f.zip |
Fix fatal bug.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/mkcatalog/src/mkcatalog.in | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/textproc/mkcatalog/src/mkcatalog.in b/textproc/mkcatalog/src/mkcatalog.in index 95eca9503692..6941e787666c 100644 --- a/textproc/mkcatalog/src/mkcatalog.in +++ b/textproc/mkcatalog/src/mkcatalog.in @@ -83,6 +83,7 @@ proc_catalog () { rm -f ${catalog_high} else cp ${TMPCAT} ${catalog_high} || exit 1 + undelete_flag="YES" fi ;; esac @@ -99,18 +100,30 @@ dtd_name=$1 dtd_list="$*" IFS=" " n_dtd_list=$# -counter=0 +counter=${n_dtd_list} +undelete_flag="NO" -for i in ${dtd_list} +while [ ${counter} -ne 0 ]; do - counter=`expr ${counter} + 1` - cat_high_dir=${CAT_DIR}${dtd_base} + lower_dtd_dir=`echo ${dtd_list} | sed 's/[^ ]* //g'` + upper_dtd_list=`echo ${dtd_list} | sed "s/${lower_dtd_dir}$//"` + + cat_high_dir=${CAT_DIR}/`echo "${upper_dtd_list}" | sed 's; ;/;g'` + cat_high_dir=`echo ${cat_high_dir} | sed 's;/$;;'` + cat_low_dir=${lower_dtd_dir} + + if [ ${undelete_flag} = "YES" ]; then + exit 0; + fi if [ ${counter} -ne ${n_dtd_list} ]; then - proc_catalog ${cat_high_dir}/catalog ${i}/catalog + proc_catalog ${cat_high_dir}/catalog ${cat_low_dir}/catalog else - proc_catalog ${cat_high_dir}/catalog ${i}/${dtd_catalog:-catalog} + proc_catalog ${cat_high_dir}/catalog ${cat_low_dir}/${dtd_catalog:-catalog} fi - dtd_base=${dtd_base}/$i + counter=`expr ${counter} - 1` + dtd_list=${upper_dtd_list} done + +exit 0; |