wok diff get-msttcorefonts2/stuff/get-msttcorefonts2 @ rev 19452

Up fasm (1.71.57)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 20 16:31:20 2016 +0200 (2016-10-20)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/get-msttcorefonts2/stuff/get-msttcorefonts2	Thu Oct 20 16:31:20 2016 +0200
     1.3 @@ -0,0 +1,59 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +. /lib/libtaz.sh
     1.7 +
     1.8 +PACKAGE="msttcorefonts2"
     1.9 +VERSION="1.0"
    1.10 +CUR_DIR=$(pwd)
    1.11 +TEMP_DIR="$(mktemp -d)"
    1.12 +ROOT="$1"
    1.13 +
    1.14 +# Check if we are root
    1.15 +check_root
    1.16 +
    1.17 +fontdir="$TEMP_DIR/$PACKAGE-$VERSION/fs/usr/share/fonts/truetype/$PACKAGE"
    1.18 +mkdir -p "$fontdir"
    1.19 +cd "$fontdir"
    1.20 +
    1.21 +for filename in EUupdate.EXE PowerPointViewer.exe; do
    1.22 +	busybox wget "http://downloads.sourceforge.net/mscorefonts2/$filename"
    1.23 +	cabextract -L $filename
    1.24 +	find "$fontdir" -type f -name '*.cab' -exec cabextract -L \{\} \;
    1.25 +	find "$fontdir" -type f ! \( -name '*.ttf' -o -name '*.ttc' \) -delete
    1.26 +done
    1.27 +
    1.28 +cd $TEMP_DIR
    1.29 +
    1.30 +cat > $PACKAGE-$VERSION/receipt <<EOT
    1.31 +# SliTaz package receipt.
    1.32 +
    1.33 +PACKAGE="$PACKAGE"
    1.34 +VERSION="$VERSION"
    1.35 +CATEGORY="non-free"
    1.36 +SHORT_DESC="Updated Microsoft's TrueType core fonts"
    1.37 +MAINTAINER="al.bobylev@gmail.com"
    1.38 +LICENSE="non-free"
    1.39 +WEB_SITE="http://sourceforge.net/projects/mscorefonts2/"
    1.40 +TAGS="fonts"
    1.41 +
    1.42 +DEPENDS="fontconfig"
    1.43 +
    1.44 +# Pre and post install commands for Tazpkg.
    1.45 +post_install()
    1.46 +{
    1.47 +	chroot "\$1/" /usr/bin/fc-cache /usr/share/fonts/truetype/$PACKAGE
    1.48 +}
    1.49 +EOT
    1.50 +
    1.51 +# Pack
    1.52 +tazpkg pack $PACKAGE-$VERSION gzip
    1.53 +
    1.54 +# Clean to save RAM memory
    1.55 +rm -rf $PACKAGE-$VERSION
    1.56 +
    1.57 +# Install pseudo package
    1.58 +yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    1.59 +
    1.60 +# Clean
    1.61 +cd $CUR_DIR
    1.62 +rm -rf $TEMP_DIR