Closed rakshith-ravi closed 7 years ago
There is no environment variable that I'm aware of. Something like this would be a good start. Then you can use the variable FONT_PATH
to test the directory already exists, if not create it, and start copying files.
HOME_FONT="$HOME/.fonts"
MOST_DISTROS="/usr/share/fonts"
RHL5="/usr/X11R6/lib/X11/fonts"
RHL6="/usr/X11R6/lib/X11/fonts"
if test -e $MOST_DISTROS ; then
FONT_PATH=$MOST_DISTROS
elif test -e $RHL5 ; then
FONT_PATH=$RHL5
elif test -e $RHL6 ; then
FONT_PATH=$RHL6
else
FONT_PATH=$HOME_FONT
fi
FONT_PATH=$FONT_PATH"/wps-fonts"
This has been fixed in the latest commit.
1cc13c48747d7977fa517d5cd80de76bfb53a18f
As of now, we are assuming that the fonts directory is at
/usr/share/fonts
. In the manual installation README, we sayThe install script also assumes the same. This might not always be the case. If anyone is up for taking the effort, we could perhaps find the fonts folder (through a command perhaps?) and automatically install it to the right folder.
Just a suggestion. Not sure if it's worth the effort.
If this does seem worth the effort, do let me know on how to go about it. I'd love to learn, figure it out and contribute