diff options
author | B. Watson <urchlay@slackware.uk> | 2023-03-07 18:22:11 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-03-12 08:48:26 +0700 |
commit | aeeb4a2a9389b0f4761322251a93135bb63d664c (patch) | |
tree | d36e9b44de9e6b073261f4e95107ff3bda17d11a /misc | |
parent | 2dfc13cd6070f84509932e501b1c558ca21e178d (diff) |
misc/font-unscii: Add douninst.sh.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/font-unscii/doinst.sh | 22 | ||||
-rw-r--r-- | misc/font-unscii/douninst.sh | 25 | ||||
-rw-r--r-- | misc/font-unscii/font-unscii.SlackBuild | 4 |
3 files changed, 41 insertions, 10 deletions
diff --git a/misc/font-unscii/doinst.sh b/misc/font-unscii/doinst.sh index 15acd6001a65..89ef3509cba2 100644 --- a/misc/font-unscii/doinst.sh +++ b/misc/font-unscii/doinst.sh @@ -1,9 +1,17 @@ # Update fonts.{dir,scale,alias} if [ -x /usr/bin/mkfontdir -a -x /usr/bin/mkfontscale ]; then for i in misc TTF OTF; do - ( cd usr/share/fonts/misc - if ! grep -q ^unscii- fonts.alias; then - cat <<EOF >> fonts.alias + ( cd usr/share/fonts/$i + /usr/bin/mkfontscale . + /usr/bin/mkfontdir . + ) + done +fi + +# Only include aliases for the bitmap fonts (e.g. xterm -fn unscii-16) +( cd usr/share/fonts/misc + if ! grep -q ^unscii- fonts.alias; then + cat <<EOF >> fonts.alias unscii-16-full -unscii-unscii-medium-r-normal-full-16-160-75-75-c-80-iso10646-1 unscii-16 -unscii-unscii-medium-r-normal-16-16-160-75-75-c-80-iso10646-1 unscii-8-alt -unscii-unscii-medium-r-normal-alt-8-80-75-75-c-80-iso10646-1 @@ -13,12 +21,8 @@ unscii-8-tall -unscii-unscii-medium-r-normal-tall-16-160-75-75-c-80-iso10646-1 unscii-8-thin -unscii-unscii-medium-r-normal-thin-8-80-75-75-c-80-iso10646-1 unscii-8 -unscii-unscii-medium-r-normal-8-8-80-75-75-c-80-iso10646-1 EOF - fi - /usr/bin/mkfontscale . - /usr/bin/mkfontdir . - ) - done -fi + fi +) # If X is running... if [ "$DISPLAY" != "" ] && [ -x /usr/bin/xset ]; then diff --git a/misc/font-unscii/douninst.sh b/misc/font-unscii/douninst.sh new file mode 100644 index 000000000000..9e10abf2e677 --- /dev/null +++ b/misc/font-unscii/douninst.sh @@ -0,0 +1,25 @@ +# Update fonts.{dir,scale,alias} +if [ -x /usr/bin/mkfontdir -a -x /usr/bin/mkfontscale ]; then + for i in misc TTF OTF; do + ( cd usr/share/fonts/$i + /usr/bin/mkfontscale . + /usr/bin/mkfontdir . + ) + done +fi + +# Remove aliases. +( cd usr/share/fonts/misc + grep -v ^unscii- fonts.alias > fonts.alias.new + mv fonts.alias.new fonts.alias +) + +# If X is running... +if [ "$DISPLAY" != "" ] && [ -x /usr/bin/xset ]; then + /usr/bin/xset fp rehash >/dev/null 2>&1 +fi + +# Update the X font indexes: +if [ -x /usr/bin/fc-cache ]; then + /usr/bin/fc-cache -f +fi diff --git a/misc/font-unscii/font-unscii.SlackBuild b/misc/font-unscii/font-unscii.SlackBuild index 297402035667..739fc3a5c3a1 100644 --- a/misc/font-unscii/font-unscii.SlackBuild +++ b/misc/font-unscii/font-unscii.SlackBuild @@ -6,13 +6,14 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20230307 bkw: BUILD=2, fix doinst.sh, add douninst.sh for cleanup. # 20210326 bkw: updated for v2.1, reflow README, new homepage/download cd $(dirname $0) ; CWD=$(pwd) PRGNAM=font-unscii VERSION=${VERSION:-2.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} ARCH=noarch @@ -58,6 +59,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $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 |