Code

Several icon name fixes
[inkscape.git] / share / icons / hicolor / update-makefiles.sh
1 #!/bin/bash
2 # update-makefiles.sh
3 # (c) 2009 Krzysztof KosiƄski
4 # Licensed under GNU GPL; see the file COPYING for details
5 #
6 # This script regenerates the makefiles for the subdirectories of hicolor.
8 OLD_IFS=$IFS
9 IFS=$'\0'
11 for dir_size in *; do
12 if test -d $dir_size; then
14 for dir in $dir_size/*; do
15 if test -d $dir; then
16         ICONS_DATA=$(find $dir \( -name '*.svg' -o -name '*.png' \) -printf '\t%f \\\n' \
17                 | sort \
18                 | sed -e '$s|\\||')
19 #SIZE=$(echo $dir_size | sed -e 's|x.*||')
20 CONTEXT=$(echo $dir | sed -e 's|^.*/||')
21 echo \
22 'themedir = $(pkgdatadir)/icons/hicolor
23 size = '$dir_size'
24 context = '$CONTEXT'
26 iconsdir = $(themedir)/$(size)/$(context)
28 # Auto-generated by update-makefiles.sh
29 # Re-run the script to update.
31 icons_DATA = \
32 '$ICONS_DATA'
34 EXTRA_DIST = $(icons_DATA)' > $dir/Makefile.am
35 fi
36 done
38 fi
39 done
41 IFS=$OLD_IFS