use dpkg --print-architecture instead of uname -m (#43)

Termux 32-bit Installations on 64-bit OS can report architecture differently
use "dpkg --print-architecture" to report the correct current arch instead based on Termux repo architecture information
This commit is contained in:
WMCB-Tech 2021-10-05 16:25:32 +08:00
parent bec4cdbbf4
commit 1e12d82d1b

View File

@ -41,7 +41,7 @@ cat <<EOF > $CONTROL_DIR/postinst
#!/data/data/com.termux/files/usr/bin/bash
[ -z "\$PREFIX" ] && PREFIX=/data/data/com.termux/files/usr
ABI=
case \`uname -m\` in
case \`dpkg --print-architecture\` in
arm) ABI=armeabi-v7a;;
aarch64) ABI=arm64-v8a;;
i686) ABI=x86;;