File indexing completed on 2024-10-13 04:14:38
0001 #!/bin/sh 0002 # 0003 # This file is part of the KDE project 0004 # Copyright (C) 2016 Jarosław Staniek <staniek@kde.org> 0005 # 0006 # This library is free software; you can redistribute it and/or 0007 # modify it under the terms of the GNU Library General Public 0008 # License as published by the Free Software Foundation; either 0009 # version 2.1 of the License, or (at your option) any later version. 0010 # 0011 # This library is distributed in the hope that it will be useful, 0012 # but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 # Library General Public License for more details. 0015 # 0016 # You should have received a copy of the GNU Library General Public License 0017 # along with this library; see the file COPYING.LIB. If not, write to 0018 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 # Boston, MA 02110-1301, USA. 0020 # 0021 # Updates list of icon files in icons/$1/ and outputs to $2. 0022 # Used by kreport_add_icons_rcc_file() cmake macro. 0023 # 0024 set -e 0025 0026 theme=$1 0027 output=$2 0028 if [ -z "$theme" ] ; then echo "Theme name required as first argument"; exit 1; fi 0029 if [ -z "$output" ] ; then echo "Output .cmake file required as second argument"; exit 1; fi 0030 script=$(basename $0) 0031 0032 function content() 0033 { 0034 echo "# List of project's own icon files" 0035 echo "# This file is generated by $script" 0036 echo "# WARNING! All changes made in this file will be lost!" 0037 echo 0038 echo "set(_PNG_FILES" 0039 find icons/$theme/ -name \*png | sed "s/\.\///g" | sort 0040 echo ")" 0041 echo 0042 0043 echo "set(_SVG_FILES" 0044 find icons/$theme/ -name \*svg | sed "s/\.\///g" | sort 0045 echo ")" 0046 echo 0047 0048 echo "set(_FILES \${_PNG_FILES} \${_SVG_FILES})" 0049 } 0050 0051 content > $output