From e1c4ee3ac3e28a0170ee66af48e7ccdbd5b61d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Fri, 25 Nov 2011 09:41:18 +0100 Subject: [PATCH] cleanup output dir for empty db2html input (#756930) --- db2html | 6 ++++++ docbook-utils.spec | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/db2html b/db2html index 8a1f3a1..506433a 100755 --- a/db2html +++ b/db2html @@ -4,6 +4,7 @@ ADMON_GRAPHICS=/usr/share/sgml/docbook/dsssl-stylesheets/images/*.gif output=docbook2html-dir skip=0 +dbdircleanup=1 for arg in "$@" do if [ $skip -gt 0 ] @@ -19,6 +20,7 @@ do ;; *) output="$(echo $arg | sed 's,\.sgml$,,;s,\.sgm$,,;s,\.xml,,')" echo "output is $output" + dbdircleanup=0 break ;; esac @@ -32,3 +34,7 @@ mkdir ${output} mkdir ${output}/stylesheet-images cp ${ADMON_GRAPHICS} ${output}/stylesheet-images jw -f docbook -b html -o ${output} "$@" +if [ ${dbdircleanup} -eq 1 ]; +then + rm -rf ${output} +fi diff --git a/docbook-utils.spec b/docbook-utils.spec index 13e557f..e55b2cb 100644 --- a/docbook-utils.spec +++ b/docbook-utils.spec @@ -1,6 +1,6 @@ Name: docbook-utils Version: 0.6.14 -Release: 27%{?dist} +Release: 28%{?dist} Group: Applications/Text Summary: Shell scripts for managing DocBook documents @@ -138,6 +138,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/docbook2ps.* %changelog +* Fri Nov 25 2011 Ondrej Vasik 0.6.14-28 +- cleanup output dir for empty db2html input (#756930) + * Tue Feb 08 2011 Fedora Release Engineering - 0.6.14-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild