
package called gtk-update-icon-cache to break a dependency cycle with adwaita-icon-theme when building the package. (Closes: #747392) As the gtk-update-icon-cache binary doesn't actually have any libgtk-3-0 dependency, there is no longer a reason to ship a gtk2 and gtk3 variant. So from now on we will only ship one implementation built from src:gtk+3.0 and drop the Debian specific -3.0 suffix. To simplify the transition make libgtk-3-bin depend on gtk-update-icon-cache. Once all theme packages have been updated, this dependency can be dropped.
27 lines
596 B
Bash
27 lines
596 B
Bash
#!/bin/sh
|
|
|
|
case "$1" in
|
|
""|-h|--help)
|
|
echo "Usage: $0 directory [ ... ]"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
for dir in "$@"; do
|
|
if [ ! -d "$dir" ]; then
|
|
continue
|
|
fi
|
|
if [ -f "$dir"/index.theme ]; then
|
|
# Generate or regenerate the cache
|
|
if ! gtk-update-icon-cache --force --quiet "$dir"; then
|
|
echo "WARNING: icon cache generation failed for $dir"
|
|
fi
|
|
else
|
|
# No more index.theme, remove the cache if it exists
|
|
rm -f "$dir"/icon-theme.cache
|
|
rmdir -p --ignore-fail-on-non-empty "$dir"
|
|
fi
|
|
done
|
|
|
|
exit 0
|