Création d’un script de remplacement des polices

This commit is contained in:
Breizh 2023-01-13 18:04:36 +01:00
commit 18e81d8a8a

62
replacefonts.sh Normal file
View file

@ -0,0 +1,62 @@
#!/bin/bash
mount -o rw,remount /
for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Sans*/*.ttf
do
dir="$(dirname "$font")"
file="$(basename "$font")"
dest="${file//IBMPlexSansCondensed/RobotoCondensed}"
dest="${dest//IBMPlexSans/NotoSans}"
echo "$file -> $dest"
cp "$dir/$file" "/system/fonts/$dest"
chmod 644 "/system/fonts/$dest"
done
for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Sans/*.ttf
do
dir="$(dirname "$font")"
file="$(basename "$font")"
dest="${file//IBMPlexSans/Roboto}"
echo "$file -> $dest"
cp "$dir/$file" "/system/fonts/$dest"
chmod 644 "/system/fonts/$dest"
done
for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Sans/IBMPlexSans-Bold*.ttf
do
dir="$(dirname "$font")"
file="$(basename "$font")"
dest="${file//IBMPlexSans-Bold/Roboto-Black}"
echo "$file -> $dest"
cp "$dir/$file" "/system/fonts/$dest"
chmod 644 "/system/fonts/$dest"
done
for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Serif*/*.ttf
do
dir="$(dirname "$font")"
file="$(basename "$font")"
dest="${file//IBMPlexSerif/NotoSerif}"
echo "$file -> $dest"
cp "$dir/$file" "/system/fonts/$dest"
chmod 644 "/system/fonts/$dest"
done
for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Mono/*.ttf
do
dir="$(dirname "$font")"
file="$(basename "$font")"
dest="${file//IBMPlexMono/SourceSansPro}"
echo "$file -> $dest"
cp "$dir/$file" "/system/fonts/$dest"
chmod 644 "/system/fonts/$dest"
done
#reboot