AK3: add simple arch detect to optionally support arm + x86 in same zip

- for use with broad zips targetting many devices including different architectures
- enable support by putting current tools binary contents in tools/arm and adding tools/x86

(thanks @Zackptg5 for the nudge)
This commit is contained in:
osm0sis committed 2019-07-01 17:46:34 -03:00
1 parent d3363b7dcb
commit 6872cf5977
1 file changed
+11
+11
View File
@@ -71,6 +71,17 @@ unzip -o "$ZIPFILE";
if [ $? != 0 -o ! "$(ls tools)" ]; then
abort "Unzip failed. Aborting...";
fi;
for arch32 in x86 arm; do
if [ -d $home/tools/$arch32 ]; then
bb=$home/tools/$arch32/busybox;
chmod 755 $bb;
$bb >/dev/null 2>&1;
if [ $? == 0 ]; then
$bb mv -f $home/tools/$arch32/* $home/tools;
break;
fi;
fi;
done;
bb=$home/tools/busybox;
chmod 755 $bb;
$bb chmod -R 755 tools bin;