summaryrefslogtreecommitdiff
path: root/demoscript
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-01-20 17:31:03 +0100
committerJose <jose@zeroc.com>2015-01-20 17:31:03 +0100
commit7a49b8830a3f91c57b92b10bb1b5d206693bda2f (patch)
tree95cbee6f99cec4a12b200dedc94237db341a2d85 /demoscript
parentUpdated the Objective-C to generate Slice local interfaces and classes (diff)
downloadice-7a49b8830a3f91c57b92b10bb1b5d206693bda2f.tar.bz2
ice-7a49b8830a3f91c57b92b10bb1b5d206693bda2f.tar.xz
ice-7a49b8830a3f91c57b92b10bb1b5d206693bda2f.zip
Fixed (ICE-5957) - Freeze/backup demo doesn't work with multiarch dists
Diffstat (limited to 'demoscript')
-rw-r--r--demoscript/Util.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/demoscript/Util.py b/demoscript/Util.py
index 88767def2a9..0bdb0dccb0b 100644
--- a/demoscript/Util.py
+++ b/demoscript/Util.py
@@ -409,6 +409,24 @@ def isRhel():
def isSles():
return isLinux() and linuxDistribution and linuxDistribution == "SUSE LINUX"
+def isLinux64():
+ if not isLinux():
+ False
+ p = subprocess.Popen("uname -m", shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+ if(p.wait() != 0):
+ print("uname command failed:\n" + p.stdout.read().strip())
+ sys.exit(1)
+ return p.stdout.readline().decode('UTF-8').strip() == "x86_64"
+
+def isLinux32BitExe(f):
+ if not isLinux() or not os.path.isfile(f):
+ return False
+ p = subprocess.Popen("file %s" % f, shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+ if(p.wait() != 0):
+ print("file command failed:\n" + p.stdout.read().strip())
+ sys.exit(1)
+ return p.stdout.readline().decode('UTF-8').strip().find("ELF 32-bit") != -1
+
def getWinRegistryKeyValue(key, subKey):
import winreg
try: