cleanup output dir for empty db2html input (#756930)

This commit is contained in:
Ondřej Vašík 2011-11-25 09:41:18 +01:00
parent 4013b30828
commit e1c4ee3ac3
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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 <ovasik@redhat.com> 0.6.14-28
- cleanup output dir for empty db2html input (#756930)
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.14-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild