[caffe] 02/07: update template generation script
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Sat May 7 01:28:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
cdluminate-guest pushed a commit to branch master
in repository caffe.
commit 3e79a6e1e48652c902c0a2998d203be172cd56f9
Author: Zhou Mo <cdluminate at gmail.com>
Date: Fri May 6 09:10:41 2016 +0000
update template generation script
---
debian/template_autogen.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/debian/template_autogen.py b/debian/template_autogen.py
index 936fc13..5e7bf55 100755
--- a/debian/template_autogen.py
+++ b/debian/template_autogen.py
@@ -2,10 +2,11 @@
import sys
import subprocess
-if len(sys.argv) != 2:
- print ('E: missing caffe_sover')
+if len(sys.argv) != 3:
+ print ('E: missing caffe_sover deb_host_multiarch')
exit(1)
caffe_solver=sys.argv[1]
+deb_host_multiarch=sys.argv[2]
convertions_cpu = [
('debian/caffe.install.in', 'debian/caffe-cpu.install'),
@@ -26,15 +27,19 @@ for each in convertions_cpu:
cp = ['cp', each[0], each[1]]
print (*cp)
subprocess.call(cp)
- sed = ['sed', '-i', '-e', 's/#CAFFE_CONFIGURE#/caffe_cpu/g',
- '-e', 's/#CAFFE_SOVER#/'+caffe_solver+'/g', each[1]]
+ sed = ['sed', '-i',
+ '-e', 's/#CAFFE_CONFIGURE#/caffe_cpu/g',
+ '-e', 's/#CAFFE_SOVER#/'+caffe_solver+'/g',
+ '-e', 's/#DEB_HOST_MULTIARCH#/'+deb_host_multiarch+'/g', each[1]]
print (*sed)
subprocess.call(sed)
for each in convertions_cuda:
cp = ['cp', each[0], each[1]]
print (*cp)
subprocess.call(cp)
- sed = ['sed', '-i', '-e', 's/#CAFFE_CONFIGURE#/caffe_cuda/g',
- '-e', 's/#CAFFE_SOVER#/'+caffe_solver+'/g', each[1]]
+ sed = ['sed', '-i',
+ '-e', 's/#CAFFE_CONFIGURE#/caffe_cuda/g',
+ '-e', 's/#CAFFE_SOVER#/'+caffe_solver+'/g',
+ '-e', 's/#DEB_HOST_MULTIARCH#/'+deb_host_multiarch+'/g', each[1]]
print (*sed)
subprocess.call(sed)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/caffe.git
More information about the debian-science-commits
mailing list