only rm -rf docdir if we've got a %doc

CVS patchset: 983
CVS date: 1996/08/22 21:04:33
This commit is contained in:
root 1996-08-22 21:04:33 +00:00
parent 10e0cf40aa
commit ded3a0f844
1 changed files with 4 additions and 2 deletions

View File

@ -497,9 +497,11 @@ static void generateNamesAndDocScript(Spec s)
appendStringBuf(s->doc, "DOCDIR=$RPM_ROOT_DIR/$RPM_DOC_DIR/");
sprintf(fullname, "%s-%s-%s", name, packageVersion, packageRelease);
appendLineStringBuf(s->doc, fullname);
appendLineStringBuf(s->doc, "rm -rf $DOCDIR");
docs = getStringBuf(package->doc);
appendLineStringBuf(s->doc, docs);
if (*docs) {
appendLineStringBuf(s->doc, "rm -rf $DOCDIR");
appendLineStringBuf(s->doc, docs);
}
package = package->next;
}