summarylogtreecommitdiffstats
path: root/dyld
blob: 91f702f63b4ee8f192c484bff46ebd04f0ba3a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/sh

if [[ -f $1 ]]; then
	file -b $1 | grep -q "Mach-O" | grep -q "executable" 2> /dev/null || binary=$1
fi

if [[ -n $binary && $(file -b $binary) == *x86_64* ]]; then
	echo -e "\t\t\033[1;44;37mDarling 64-bit:\033[0;44;37m `basename $binary`\033[0m"
	/usr/bin/dyld64 $@
elif [[ -n $binary && $(file -b $binary) == *i386* ]]; then
	echo -e "\t\t\033[1;44;37mDarling 32-bit:\033[0;44;37m `basename $binary`\033[0m"
	/usr/bin/dyld32 $@
else
	echo -e "\t\t\033[1;44;37mDarling 64-bit\033[0m"
	/usr/bin/dyld64 $@
fi