summaryrefslogtreecommitdiff
path: root/cpp/makebindist.py
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/makebindist.py')
-rwxr-xr-xcpp/makebindist.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/cpp/makebindist.py b/cpp/makebindist.py
index a45262dcea8..796781a22e1 100755
--- a/cpp/makebindist.py
+++ b/cpp/makebindist.py
@@ -35,6 +35,14 @@ def runprog(commandstring):
msg = 'Command %s failed with error code %d' % (commandstring, result)
raise ExtProgramError(msg)
+def copyfiles(srcDir, destDir):
+ '''Copy the contents of one directory to another (non-recursive)'''
+ for f in os.listdir(srcDir):
+ src = os.path.join(srcDir, f)
+ dest = os.path.join(destDir, f)
+ if not os.path.isdir(src) and not os.path.islink(src):
+ shutil.copy(src, dest)
+
def getIceVersion(file):
"""Extract the ICE version string from a file."""
config = open(file, 'r')
@@ -1030,9 +1038,9 @@ def main():
if getPlatform() == 'hpux':
ssl = os.environ['OPENSSL_HOME']
- runprog('cp ' + ssl + '/bin/* Ice-' + version + '/bin')
- runprog('cp -R ' + ssl + '/include/* Ice-' + version + '/include')
- runprog('cp -R ' + ssl + '/lib/* Ice-' + version + '/lib')
+ copyfiles('%s/bin' % ssl, 'Ice-%s/bin' % version)
+ runprog('cp -R ' + ssl + '/include Ice-' + version)
+ runprog('cp -R ' + ssl + '/lib Ice-' + version)
runprog('rm -rf Ice-' + version + '/lib/libfips*')
uname = readcommand('uname')