# HG changeset patch # User Aleksej Bobylev # Date 1520975876 -7200 # Node ID 47df087cffcf6d5503d73ff7f375ad544042ad81 # Parent 6690b25343a3d5f5b67a6480ea1ea7dbe5da7224 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. diff -r 6690b25343a3 -r 47df087cffcf make-slitaz-icons/receipt --- a/make-slitaz-icons/receipt Tue Mar 13 13:24:41 2018 +0100 +++ b/make-slitaz-icons/receipt Tue Mar 13 23:17:56 2018 +0200 @@ -1,22 +1,18 @@ # SliTaz package receipt v2. PACKAGE="make-slitaz-icons" -VERSION="170913" +VERSION="180313" CATEGORY="development" SHORT_DESC="Make SliTaz icon theme" MAINTAINER="al.bobylev@gmail.com" LICENSE="GPL3" WEB_SITE="http://www.slitaz.org/" -# Rules to compile and make the package. compile_rules() { - mkdir -p $install/usr/bin - install -m755 -oroot -groot $stuff/mksit.sh $install/usr/bin + install -Dm755 $stuff/mksit.sh $install/usr/bin/mksit.sh } -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ +genpkg_rules() { copy @std DEPENDS="rsvg-convert optipng-static symlinks" TAGS="icons" diff -r 6690b25343a3 -r 47df087cffcf make-slitaz-icons/stuff/mksit.sh --- a/make-slitaz-icons/stuff/mksit.sh Tue Mar 13 13:24:41 2018 +0100 +++ b/make-slitaz-icons/stuff/mksit.sh Tue Mar 13 23:17:56 2018 +0200 @@ -3,7 +3,7 @@ # Aleksej Bobylev , 2014-2017 # (Started in November 2014) -VERSION="170913" +VERSION="180313" . /lib/libtaz.sh @@ -73,7 +73,15 @@ colored 33 "? $1($SIZE): Multiple choice:" echo "$FINDICON" | sed 's|^.*$| * &|g' fi - FINDICON="$(echo "$FINDICON" | head -n1)" + # Multiple choice. Choose one with /$SIZE/ in the path. + # Or choose other with /$SIZEx$SIZE. Or choose just the first one. + FINDICON="$(echo "$FINDICON" | grep "/$SIZE/")" + if [ "$(echo "$FINDICON" | wc -l)" -ne 1 ]; then + FINDICON="$(echo "$FINDICON" | grep "/${SIZE}x${SIZE}/")" + if [ "$(echo "$FINDICON" | wc -l)" -ne 1 ]; then + FINDICON="$(echo "$FINDICON" | head -n1)" + fi + fi fi mkdir -p $TO/${SIZE}x${SIZE}/$CATEGORY