Quote:
Originally Posted by xuyn2003
Now I can replace any fonts of /ebook, including the system UI fonts.
Code:
#!/system/bin/sh
mkdir /data/altsd
mount -o noatime,utf8 -t vfat /dev/block/mmcblk2p4 /data/altsd
afd=/data/altsd/altfonts/
fts=`ls $afd`
for ft in $fts
do
mount -o bind $afd$ft /ebook/fonts/$ft
done
|
One query - do you need to deal with the possibility of font files with spaces in the names? You might need to do something like:
Code:
afd=/data/altsd/altfonts/
fts=$(cd $afd; echo "*")
for ft in $fts; do
mount -o bind $afd"$ft" /ebook/fonts/"$ft"
done
or
Code:
afd=/data/altsd/altfonts/
ls -1 $afd | while read ft; do
mount -o bind $afd"$ft" /ebook/fonts/"$ft"
done
where the " marks are important.
Cheers,
Simon.