ios-kernel-patch/data/ldid_wrapper

23 lines
461 B
Plaintext
Raw Permalink Normal View History

2021-02-18 10:42:34 +07:00
#!/bin/sh
set -e
ldid=ldid
for last; do
ldid="$ldid $old"
old="$last"
done
archs="$(lipo -info "$last")"
if [ -z "$(echo $archs | grep are:)" ]; then
$ldid "$last"
else
archs="$(echo $archs | sed 's/^.*are: //')"
temp=$(mktemp -d /tmp/ldid_wrapper.XXXXX)
for arch in $archs; do
lipo -thin $arch -output $temp/$arch "$last"
$ldid $temp/$arch
done
lipo -create -output "$last" $temp/*
rm -rf $temp
fi