Files
StateGrid/other_shell/addfonts
Qin Bo 2235771f09 Initial commit
Signed-off-by: Qin Bo <bqin@linx-info.com>
2014-02-19 09:07:55 +08:00

24 lines
358 B
Bash

#!/bin/bash
ROOT_UID=0
E_ROOT=2
if [ $UID -ne $ROOT_UID ];then
echo "You must run this script use root ..."
exit $E_ROOT
fi
Fonts_DIR=/usr/share/fonts/truetype/arphic/
if [ "$1" = ' ' ];then
echo "Usage:[FONTS]"
exit 1
else
cp "$1" $Fonts_DIR
cd $Fonts_DIR
mkfontscale
mkfontdir
fc-cache -f
fi