nixpkgs/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh
Victor Engmark 57b496ea98 misc: Replace tab indentation with spaces
I've tried to be consistent, using four or eight spaces to line up
with existing code.
2021-11-14 16:04:46 +13:00

18 lines
550 B
Bash

findGdkPixbufLoaders() {
# choose the longest loaders.cache
local loadersCache="$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
if [[ -f "$loadersCache" ]]; then
if [[ -f "${GDK_PIXBUF_MODULE_FILE-}" ]]; then
if (( "$(cat "$loadersCache" | wc -l)" > "$(cat "$GDK_PIXBUF_MODULE_FILE" | wc -l)" )); then
export GDK_PIXBUF_MODULE_FILE="$loadersCache"
fi
else
export GDK_PIXBUF_MODULE_FILE="$loadersCache"
fi
fi
}
addEnvHooks "$targetOffset" findGdkPixbufLoaders