Skip to content
Snippets Groups Projects
Commit 160a7ea7 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

support to detect 32 v 64bit and get the right library

Former-commit-id: a9e86d7ab4d30f43e54d82081449fff2130ff785
parent 7453780c
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
if [ ! -f $CFAR_HOME/DieHard/src/libdiehard.so ]; then
if [ ! -f $CFAR_HOME/DieHard/src/libdiehard-4k-x64.so ]; then
echo "ERROR: DieHard library not built/found" | tee warning.txt
exit 1
fi
......@@ -23,22 +23,32 @@ case $key in
esac
done
file a.ncexe |grep -q "64-bit"
if (file a.ncexe |grep -q "64-bit") ; then
echo "Detected 64-bit binary"
ext=x64
else
echo "Detected 32-bit binary"
ext=x32
fi
if [ -z "$seq" ]; then
cp $CFAR_HOME/DieHard/src/libdiehard.so libheaprand.so
cp $CFAR_HOME/DieHard/src/libdiehard-32k-$ext.so libheaprand.so
else
if [ ! -f $CFAR_HOME/DieHard/src/libdiehard-4k.so ]; then
if [ ! -f $CFAR_HOME/DieHard/src/libdiehard-4k-$ext.so ]; then
echo "ERROR: DieHard library 4k not built/found" | tee warning.txt
exit 1
fi
if [ ! -f $CFAR_HOME/DieHard/src/libdiehard-32k.so ]; then
if [ ! -f $CFAR_HOME/DieHard/src/libdiehard-32k-$ext.so ]; then
echo "ERROR: DieHard library 32k not built/found" | tee warning.txt
exit 1
fi
if [ $(expr ${seq} % 2) = 0 ]; then
cp $CFAR_HOME/DieHard/src/libdiehard-32k.so libheaprand.so
cp $CFAR_HOME/DieHard/src/libdiehard-32k-$ext.so libheaprand.so
else
cp $CFAR_HOME/DieHard/src/libdiehard-4k.so libheaprand.so
cp $CFAR_HOME/DieHard/src/libdiehard-4k-$ext.so libheaprand.so
fi
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment