[QuantLib] conditionalize generic renames on presense

Tom Callaway spot at fedoraproject.org
Fri Aug 3 15:00:36 UTC 2012


commit a25983233402a57e43287f2977ef61952882fe2c
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Fri Aug 3 11:01:13 2012 -0400

    conditionalize generic renames on presense

 QuantLib.spec |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/QuantLib.spec b/QuantLib.spec
index b7d06d6..c108174 100644
--- a/QuantLib.spec
+++ b/QuantLib.spec
@@ -66,7 +66,11 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
 rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.a
 # So many of the names in the Quantlib manpages are generic, so we rename them to avoid conflicts.
 for i in history format gamma manips engines rate floor group license todo error deprecated attachment description domain.hpp method next value; do
-	mv $RPM_BUILD_ROOT/%{_mandir}/man3/$i.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-$i.3
+	if [ -f $i.3 ]; then
+		mv $RPM_BUILD_ROOT/%{_mandir}/man3/$i.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-$i.3
+	else
+		echo "$i.3 not found in $RPM_BUILD_ROOT/%{_mandir}/man3/"
+	fi
 done
 
 # Get rid of spaces in man page names


More information about the scm-commits mailing list