X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage4%2Fconfigure-fonts;h=6345568bebc4c3d182938e5ce16cfba77b0617a2;hb=3a7685561df0a4d80e727e5b26fbf413ad0586f2;hp=10cc8698e39fd1593aa4b6336de66d9f45ff968d;hpb=8682d21fc12f098f699a73b355b057c914b92505;p=hvlinux.git diff --git a/stage4/configure-fonts b/stage4/configure-fonts index 10cc869..6345568 100755 --- a/stage4/configure-fonts +++ b/stage4/configure-fonts @@ -1,22 +1,13 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -install -v -d -m755 /usr/share/fonts -ln -svfT ${XORG_PREFIX}/lib/X11/fonts/OTF /usr/share/fonts/X11-OTF -ln -svfT ${XORG_PREFIX}/lib/X11/fonts/TTF /usr/share/fonts/X11-TTF +source ../functions/main X11_FONTS_DIR="/usr/share/fonts/X11" -if ! grep "${X11_FONTS_DIR}" /etc/fonts/local.conf 1> /dev/null 2>&1; then +if ! grep -q "${X11_FONTS_DIR}" /etc/fonts/local.conf; then # Adding X fonts directory to local configuration file - sed -i -e "s!\(\)! ${X11_FONTS_DIR}\n\1!" /etc/fonts/local.conf + sed -i -e "s!\(\)! ${X11_FONTS_DIR}\n\1!" \ + /etc/fonts/local.conf fi # Updating cache database.