#!/bin/sh

# create symlinks from all codecs (bmp/.libs/libkls_bmp.so, ...)
# to /usr/lib/ksquirrel-libs/
#
# Can be used by developers
#
# Usage:
#  $ cd ksquirrel-libs/kernel/
#  $ ./link
#

KSQUIRREL_LIBS="/usr/lib/ksquirrel-libs/"

rm -f $KSQUIRREL_LIBS/*

mkdir $KSQUIRREL_LIBS > /dev/null 2>&1

for i in avs bmp camera cut dds dicom eps fli gif hdr ico iff fig jbig jpeg jpeg2000 koala ljpeg lif mac mdl mng msp mtv openexr pcx pix png pnm psd psp pxr ras rawrgb sct sgi sun svg tga tiff ttf utah wal wbmp wmf xbm xcur xpm xwd djvu dxf xcf neo leaf pi1 pi3 xim pict;
do echo "Linking libkls_$i.so ..." && ln -s `pwd`/kls_$i/.libs/libkls_$i.so $KSQUIRREL_LIBS;
done

rm -f /usr/lib/libksquirrel-libs.so
ln -s `pwd`/ksquirrel-libs/.libs/libksquirrel-libs.so /usr/lib
