From c18329b57362ecd52b5fc21491c1f61b951a9381 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 7 Mar 2023 23:50:53 -0500 Subject: system/dina-font: Add douninst.sh. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- system/dina-font/dina-font.SlackBuild | 5 ++++- system/dina-font/doinst.sh | 5 ++++- system/dina-font/douninst.sh | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 system/dina-font/douninst.sh (limited to 'system/dina-font') diff --git a/system/dina-font/dina-font.SlackBuild b/system/dina-font/dina-font.SlackBuild index c11f690ddf..41a01e03b7 100644 --- a/system/dina-font/dina-font.SlackBuild +++ b/system/dina-font/dina-font.SlackBuild @@ -26,6 +26,8 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230307 bkw: BUILD=2, add douninst.sh. + # 20180117 bkw: # - update for v2.93, BUILD=1 # - original site has gone away, use gentoo distfiles for download and @@ -52,7 +54,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=dina-font VERSION=${VERSION:-2.93} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -143,6 +145,7 @@ sed -e "s,@ANDCONSOLE@,$ANDCONSOLE," \ -e "s,@ONLY@,$ONLY," \ $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/douninst.sh > $PKG/install/douninst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/dina-font/doinst.sh b/system/dina-font/doinst.sh index 96b0162ebe..8bf0ea71d1 100644 --- a/system/dina-font/doinst.sh +++ b/system/dina-font/doinst.sh @@ -1,6 +1,6 @@ if [ -x /usr/bin/mkfontdir ]; then ( cd usr/share/fonts/misc - if ! grep -q ^Dina_ fonts.alias 2>/dev/null; then + if ! grep -q '^Dina_\([689]\|10\) ' fonts.alias 2>/dev/null; then echo 'Dina_6 -windows-dina-medium-r-normal--8-60-96-96-c-60-microsoft-cp1252' >> fonts.alias echo 'Dina_8 -windows-dina-medium-r-normal--10-80-96-96-c-70-microsoft-cp1252' >> fonts.alias echo 'Dina_9 -windows-dina-medium-r-normal--12-90-96-96-c-70-microsoft-cp1252' >> fonts.alias @@ -10,6 +10,9 @@ if [ -x /usr/bin/mkfontdir ]; then mkfontdir . ) fi + +[ "$DISPLAY" != "" ] && xset fp rehash 2>/dev/null + if [ -x usr/bin/fc-cache ]; then usr/bin/fc-cache -f fi diff --git a/system/dina-font/douninst.sh b/system/dina-font/douninst.sh new file mode 100644 index 0000000000..f1bc56ae86 --- /dev/null +++ b/system/dina-font/douninst.sh @@ -0,0 +1,14 @@ +if [ -x /usr/bin/mkfontdir ]; then + ( cd usr/share/fonts/misc + grep -v '^Dina_\([689]\|10\) ' fonts.alias > fonts.alias.new + mv fonts.alias.new fonts.alias + mkfontscale . + mkfontdir . + ) +fi + +[ "$DISPLAY" != "" ] && xset fp rehash 2>/dev/null + +if [ -x usr/bin/fc-cache ]; then + usr/bin/fc-cache -f +fi -- cgit v1.2.3-65-gdbad