mirror of
https://github.com/hasherezade/tiny_tracer
synced 2026-06-08 14:36:37 +00:00
58 lines
1.1 KiB
Bash
Executable File
58 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
TT_BUILD_32=TinyTracer32.so
|
|
TT_BUILD_64=TinyTracer64.so
|
|
|
|
TT_32=./obj-ia32/$TT_BUILD_32
|
|
TT_64=./obj-intel64/$TT_BUILD_64
|
|
|
|
TARGET_DIR=./install32_64
|
|
|
|
if [ -f $TT_32 ]; then
|
|
rm $TT_32
|
|
fi
|
|
if [ -f $TT_64 ]; then
|
|
rm $TT_64
|
|
fi
|
|
|
|
if [ -f $TARGET_DIR/$TT_BUILD_32 ]; then
|
|
rm $TARGET_DIR/$TT_BUILD_32
|
|
fi
|
|
if [ -f $TARGET_DIR/$TT_BUILD_64 ]; then
|
|
rm $TARGET_DIR/$TT_BUILD_64
|
|
fi
|
|
|
|
make all TARGET=ia32
|
|
make all TARGET=intel64
|
|
|
|
APP_TYPE32=$(file "$TT_32")
|
|
APP_TYPE64=$(file "$TT_64")
|
|
|
|
if [[ $APP_TYPE64 == *"ELF 64-bit"* ]];
|
|
then
|
|
echo "[+] 64 bit build ok."
|
|
cp "$TT_64" $TARGET_DIR/$TT_BUILD_64
|
|
if [[ $? == 0 ]];
|
|
then
|
|
echo "[+] 64 bit install ok."
|
|
else
|
|
echo "ERROR: 64 bit install failed."
|
|
fi
|
|
else
|
|
echo "ERROR: Could not build the 64-bit TinyTracer"
|
|
fi
|
|
|
|
if [[ $APP_TYPE32 == *"ELF 32-bit"* ]];
|
|
then
|
|
echo "[+] 32 bit build ok."
|
|
cp "$TT_32" $TARGET_DIR/$TT_BUILD_32
|
|
if [[ $? == 0 ]];
|
|
then
|
|
echo "[+] 32 bit install ok."
|
|
else
|
|
echo "ERROR: 32 bit install failed."
|
|
fi
|
|
else
|
|
echo "ERROR: Could not build the 32-bit TinyTracer"
|
|
fi
|