aboutsummaryrefslogtreecommitdiff
path: root/textproc/mkcatalog
diff options
context:
space:
mode:
authorShigeyuki Fukushima <shige@FreeBSD.org>2000-10-27 14:21:57 +0000
committerShigeyuki Fukushima <shige@FreeBSD.org>2000-10-27 14:21:57 +0000
commit2bc3d5307444d3f3fd56e889f904bc9302e6bda6 (patch)
tree3feaa51c61662e27697d8c27011524042b56f963 /textproc/mkcatalog
parent18181e71aaac85c2dda77eb4ec86ca130035ec81 (diff)
downloadports-2bc3d5307444d3f3fd56e889f904bc9302e6bda6.tar.gz
ports-2bc3d5307444d3f3fd56e889f904bc9302e6bda6.zip
Notes
Diffstat (limited to 'textproc/mkcatalog')
-rw-r--r--textproc/mkcatalog/src/mkcatalog.in27
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;