4a0c875
#! /bin/sh
4a0c875
4a0c875
if test $# != 1; then
4a0c875
  echo usage: update-gdk-pixbuf-loaders host_triplet 1>&2
4a0c875
  exit 1
4a0c875
fi
4a0c875
4a0c875
umask 022
4a0c875
# Deriving /etc/gtk-2.0/$host location
4a0c875
#
4a0c875
# autoconf changes linux to linux-gnu
4a0c875
case "$1" in
4a0c875
  *linux) host="$1-gnu"
4a0c875
  ;;
4a0c875
  *) host=$1
4a0c875
  ;;
4a0c875
esac
4a0c875
4a0c875
# autoconf uses powerpc not ppc
4a0c875
host=`echo $host | sed "s/^ppc/powerpc/"`
2c1af48
# autoconf uses ibm-linux not redhat-linux (s390x)
2c1af48
host=`echo $host | sed "s/^s390\(x\)*-redhat/s390\1-ibm/"`
4a0c875
4a0c875
# We have had problems in the past with build systems
4a0c875
# changing host from i386 to i686 and appending/dropping
4a0c875
# the -gnu suffix, so try to match up the $host we got
4a0c875
# with whats actually there.
4a0c875
if [ ! -d /etc/gtk-2.0/$host ]; then 
4a0c875
   case "$host" in
4a0c875
     i?86*) 
4a0c875
         for d in $(ls -d /etc/gtk-2.0/i?86*); do
4a0c875
           host=$(basename $d)
4a0c875
           break
4a0c875
         done
4a0c875
     ;;
4a0c875
   esac
4a0c875
fi 
4a0c875
4a0c875
FILE=/etc/gtk-2.0/$host/gdk-pixbuf.loaders
4a0c875
4a0c875
case "$host" in
4a0c875
  alpha*|ia64*|powerpc64*|s390x*|x86_64*)
4a0c875
   /usr/bin/gdk-pixbuf-query-loaders-64 > $FILE
4a0c875
   ;;
4a0c875
  *)
4a0c875
   /usr/bin/gdk-pixbuf-query-loaders-32 > $FILE
4a0c875
   ;;
4a0c875
esac