[python-whisper] Use loop to rename files

Jamie Nguyen jamielinux at fedoraproject.org
Wed Oct 1 09:17:43 UTC 2014


commit 2d553c267d70b4f25589f9918417a11c6dee9f5d
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Wed Oct 1 09:58:55 2014 +0100

    Use loop to rename files

 python-whisper.spec |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/python-whisper.spec b/python-whisper.spec
index 5854038..979b172 100644
--- a/python-whisper.spec
+++ b/python-whisper.spec
@@ -60,18 +60,10 @@ install -D -p -m0644 %{SOURCE16} $RPM_BUILD_ROOT%{_mandir}/man1
 install -D -p -m0644 %{SOURCE17} $RPM_BUILD_ROOT%{_mandir}/man1
 install -D -p -m0644 %{SOURCE18} $RPM_BUILD_ROOT%{_mandir}/man1
 
-# Temp mv to non .py locations
-pushd $RPM_BUILD_ROOT/usr/bin/
-%{__mv} rrd2whisper.py rrd2whisper
-%{__mv} whisper-create.py whisper-create
-%{__mv} whisper-dump.py whisper-dump
-%{__mv} whisper-fetch.py whisper-fetch
-%{__mv} whisper-info.py whisper-info
-%{__mv} whisper-merge.py whisper-merge
-%{__mv} whisper-resize.py whisper-resize
-%{__mv} whisper-set-aggregation-method.py whisper-set-aggregation-method
-%{__mv} whisper-update.py whisper-update
-popd
+# remove .py suffix
+for i in %{buildroot}%{_bindir}/*.py; do
+    mv ${i} ${i%%.py}
+done
 
  
 %files


More information about the scm-commits mailing list