mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
misc/font-unscii: Add douninst.sh.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
2dfc13cd60
commit
aeeb4a2a93
3 changed files with 41 additions and 10 deletions
|
@ -1,6 +1,14 @@
|
|||
# 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
|
||||
|
||||
# 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
|
||||
|
@ -14,11 +22,7 @@ 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
|
||||
|
||||
# If X is running...
|
||||
if [ "$DISPLAY" != "" ] && [ -x /usr/bin/xset ]; then
|
||||
|
|
25
misc/font-unscii/douninst.sh
Normal file
25
misc/font-unscii/douninst.sh
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue