#!/bin/sh
set -e

. optvars

for PROGRAM in $KUMATUXOPT/*
do
    if [ ! -e $PROGRAM/.nonlinked ]
    then
	APPNAME=`basename $PROGRAM | sed 's/_.*//'`
	if [ $APPNAME = python ]
	then
	    PYVER=`basename $PROGRAM | sed 's/python_\(...\).*/\1/'`
	    $KUMATUXMESSAGE "Linking python version $PYVER into /usr/lib/..."
    	    ln -sv $PROGRAM/lib/python$PYVER /usr/lib/
	    $KUMATUXMESSAGE "Linked."
	fi
    fi
done
