#!/bin/bash

# Temporary KDE setup script... this to be controlled via a wrapper

mkdir -p /opt/kde-${KDE_VER}
ln -sfn kde-${KDE_VER} /opt/kde

export KDE_PREFIX=/opt/kde-${KDE_VER}

export PATH=${PATH}:${KDE_PREFIX}/bin
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${KDE_PREFIX}/${libdirname}/pkgconfig

grep ${KDE_PREFIX}/${libdirname} /etc/ld.so.conf > /dev/null 2>&1 ||
   echo "${KDE_PREFIX}/${libdirname}" >> /etc/ld.so.conf

grep ${KDE_PREFIX}/man /etc/man.conf > /dev/null 2>&1 ||
echo "${KDE_PREFIX}/man" >> /etc/man.conf

if [ -z ${XDG_DATA_DIRS} ]; then
   export XDG_DATA_DIRS=/usr/share:${KDE_PREFIX}/share
else
   export XDG_DATA_DIRS=${XDG_DATA_DIRS}:${KDE_PREFIX}/share
fi
