5 # /system/addon.d/99-font.sh
8 # we partially use the script at install, if so, $SYSTEM is allready defined
9 if [ -z $SYSTEM ]; then
10 . /tmp/backuptool.functions
14 if [ -z $backuptool_ab ]; then
19 TMP="/postinstall/tmp"
22 # path is needed when running from recovery (at install)
23 export PATH="${PATH}:$S/bin:$S/xbin"
27 fonts/NotoSans-BlackItalic.ttf
28 fonts/NotoSans-Black.ttf
29 fonts/NotoSans-BoldItalic.ttf
30 fonts/NotoSans-Bold.ttf
31 fonts/NotoSans-Italic.ttf
32 fonts/NotoSans-LightItalic.ttf
33 fonts/NotoSans-Light.ttf
34 fonts/NotoSans-MediumItalic.ttf
35 fonts/NotoSans-Medium.ttf
36 fonts/NotoSans-Regular.ttf
37 fonts/NotoSans-ThinItalic.ttf
38 fonts/NotoSans-Thin.ttf
44 list_files | while read FILE DUMMY; do
45 backup_file $S/"$FILE"
49 list_files | while read FILE REPLACEMENT; do
51 [ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
52 [ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
66 cp -p "$SYS/etc/fonts.xml" "$SYS/etc/fonts.xml.bak"
68 -e "s/Roboto-/NotoSans-/g" \
70 # Fix ownership/permissions
71 for i in $(list_files); do
72 chown root:root "$SYS/$i"
74 chmod 755 "$(dirname "$SYS/$i")"