diff options
author | Tomasz Bywalec <t.bywalec@gmail.com> | 2019-06-05 22:18:44 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-06-09 05:31:21 +0700 |
commit | 642828d7c7b77b4715af6c0204bfbadc95a25e6d (patch) | |
tree | bc20bd1f38bc3e653c81ea02f245273d40e057ab /system/gnu-unifont/gnu-unifont.SlackBuild | |
parent | 34d06147b5b79ea699eef057425e49a1cc434868 (diff) |
system/gnu-unifont: Updated for version 12.1.02.
Also:
* Remove bashisms when checking FONTFORMATS var
* Print error message if no font format has been selected
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/gnu-unifont/gnu-unifont.SlackBuild')
-rw-r--r-- | system/gnu-unifont/gnu-unifont.SlackBuild | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/system/gnu-unifont/gnu-unifont.SlackBuild b/system/gnu-unifont/gnu-unifont.SlackBuild index 3c1f7e22775c4..d7d897cbfdcb4 100644 --- a/system/gnu-unifont/gnu-unifont.SlackBuild +++ b/system/gnu-unifont/gnu-unifont.SlackBuild @@ -25,7 +25,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=gnu-unifont -VERSION=${VERSION:-12.1.01} +VERSION=${VERSION:-12.1.02} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -40,6 +40,11 @@ SRCNAM=unifont DOCFILES="ChangeLog COPYING INSTALL NEWS README" FONTFORMATS=${FONTFORMATS:-ttf,pcf,psf} +contains() +{ + echo "$1" | grep -qi "\(^\|,\)$2\($\|,\)" +} + set -e rm -rf $PKG @@ -55,25 +60,40 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +FONTSCOPIED=0 + cd font/precompiled -if [[ $FONTFORMATS == *pcf* ]]; then +if contains "$FONTFORMATS" "pcf"; then mkdir -p $PKG/usr/share/fonts/misc cp -a *.pcf.gz $PKG/usr/share/fonts/misc + + FONTSCOPIED=1 fi -if [[ $FONTFORMATS == *ttf* ]]; then +if contains "$FONTFORMATS" "ttf"; then mkdir -p $PKG/usr/share/fonts/TTF cp -a *.ttf $PKG/usr/share/fonts/TTF + + FONTSCOPIED=1 fi -if [[ $FONTFORMATS == *psf* ]]; then +if contains "$FONTFORMATS" "psf"; then mkdir -p $PKG/usr/share/kbd/consolefonts cp -a *.psf.gz $PKG/usr/share/kbd/consolefonts + + FONTSCOPIED=1 fi cd - +if [ "$FONTSCOPIED" -eq 0 ]; then + echo + echo "No fonts selected to be included in the package." + echo "Please check value of the FONTFORMATS environment variable." + exit 1 +fi + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |