Skip to content

Commit

Permalink
gdk-pixbuf setup hook: GDK_PIXBUF_MODULE_FILE might not be defined
Browse files Browse the repository at this point in the history
Also switch to [[ ... ]] because it is more robust w.r.t. empty
arguments.
  • Loading branch information
Ericson2314 committed Nov 8, 2019
1 parent aaf0fd2 commit b78e840
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkgs/development/libraries/gdk-pixbuf/setup-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ 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) -gt $(cat "$GDK_PIXBUF_MODULE_FILE"|wc -l) ]; then
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
Expand Down

0 comments on commit b78e840

Please sign in to comment.