gdk-pixbuf setup hook: GDK_PIXBUF_MODULE_FILE might not be defined
Also switch to [[ ... ]] because it is more robust w.r.t. empty arguments.
This commit is contained in:
parent
aaf0fd2c44
commit
b78e84097f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user