magisk-aiot/common/install.sh

29 lines
860 B
Bash
Raw Permalink Normal View History

2023-12-02 18:32:05 +00:00
SOC=`getprop ro.board.platform`
ui_print ""
ui_print "*** $MODID"
ui_print "** SDK $API"
ui_print "** ARCH $ARCH"
ui_print "** SOC $SOC"
ui_print "***"
ui_print ""
#
# JoyPixels installation
#
# The following is the default implementation: extract $ZIPFILE/system to $MODPATH
# Extend/change the logic to whatever you want
ui_print "- Extracting module files"
unzip -o "$ZIPFILE" 'system/fonts/JoyPixels.ttf' -d $MODPATH >&2
ui_print "- Searching in fonts.xml"
[[ -d /sbin/.core/mirror ]] && MIRRORPATH=/sbin/.core/mirror || unset MIRRORPATH
FILE=/system/etc/fonts.xml
FILENAME=$(sed -ne '/<family lang="und-Zsye".*>/,/<\/family>/ {s/.*<font weight="400" style="normal">\(.*\)<\/font>.*/\1/p;}' $MIRRORPATH$FILE)
for i in $FILENAME
do
ui_print "- Copying fonts files to $i"
cp -f $MODPATH/system/fonts/JoyPixels.ttf $MODPATH/system/fonts/$i
done