wok-next rev 20494

make-slitaz-icons: in multiple choice for 16px request: if 16px and scalable icons both are available, try to choose 16px one, but not the first caught.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Mar 13 23:17:56 2018 +0200 (2018-03-13)
parents 6690b25343a3
children 3a83e0dce9d6
files make-slitaz-icons/receipt make-slitaz-icons/stuff/mksit.sh
line diff
     1.1 --- a/make-slitaz-icons/receipt	Tue Mar 13 13:24:41 2018 +0100
     1.2 +++ b/make-slitaz-icons/receipt	Tue Mar 13 23:17:56 2018 +0200
     1.3 @@ -1,22 +1,18 @@
     1.4  # SliTaz package receipt v2.
     1.5  
     1.6  PACKAGE="make-slitaz-icons"
     1.7 -VERSION="170913"
     1.8 +VERSION="180313"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="Make SliTaz icon theme"
    1.11  MAINTAINER="al.bobylev@gmail.com"
    1.12  LICENSE="GPL3"
    1.13  WEB_SITE="http://www.slitaz.org/"
    1.14  
    1.15 -# Rules to compile and make the package.
    1.16  compile_rules() {
    1.17 -	mkdir -p $install/usr/bin
    1.18 -	install -m755 -oroot -groot $stuff/mksit.sh $install/usr/bin
    1.19 +	install -Dm755 $stuff/mksit.sh $install/usr/bin/mksit.sh
    1.20  }
    1.21  
    1.22 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.23 -genpkg_rules()
    1.24 -{
    1.25 +genpkg_rules() {
    1.26  	copy @std
    1.27  	DEPENDS="rsvg-convert optipng-static symlinks"
    1.28  	TAGS="icons"
     2.1 --- a/make-slitaz-icons/stuff/mksit.sh	Tue Mar 13 13:24:41 2018 +0100
     2.2 +++ b/make-slitaz-icons/stuff/mksit.sh	Tue Mar 13 23:17:56 2018 +0200
     2.3 @@ -3,7 +3,7 @@
     2.4  # Aleksej Bobylev <al.bobylev@gmail.com>, 2014-2017
     2.5  # (Started in November 2014)
     2.6  
     2.7 -VERSION="170913"
     2.8 +VERSION="180313"
     2.9  
    2.10  . /lib/libtaz.sh
    2.11  
    2.12 @@ -73,7 +73,15 @@
    2.13  						colored 33 "? $1($SIZE): Multiple choice:"
    2.14  						echo "$FINDICON" | sed 's|^.*$|  * &|g'
    2.15  					fi
    2.16 -					FINDICON="$(echo "$FINDICON" | head -n1)"
    2.17 +					# Multiple choice. Choose one with /$SIZE/ in the path.
    2.18 +					# Or choose other with /$SIZEx$SIZE. Or choose just the first one.
    2.19 +					FINDICON="$(echo "$FINDICON" | grep "/$SIZE/")"
    2.20 +					if [ "$(echo "$FINDICON" | wc -l)" -ne 1 ]; then
    2.21 +						FINDICON="$(echo "$FINDICON" | grep "/${SIZE}x${SIZE}/")"
    2.22 +						if [ "$(echo "$FINDICON" | wc -l)" -ne 1 ]; then
    2.23 +							FINDICON="$(echo "$FINDICON" | head -n1)"
    2.24 +						fi
    2.25 +					fi
    2.26  				fi
    2.27  				mkdir -p $TO/${SIZE}x${SIZE}/$CATEGORY
    2.28