#!/bin/sh
set -e

. kumatux.org-vars

SEARCH=bin
ROOTDIR=$KUMATUXROOTBIN
ETCDIR=$KUMATUXETCBIN

## check whether app already linked
LINKED=`$KUMATUXFIND/linked-allready.sh $1 $ROOTDIR $SEARCH`
if [ "$LINKED" ]
then
## don't link
    echo "$1/$SEARCH linked already in $LINKED"
else
## link
    $KUMATUXLINK/link-line.sh $1 $SEARCH $ETCDIR $ROOTDIR
fi

SEARCH=sbin

## check whether app already linked
LINKED=`$KUMATUXFIND/linked-allready.sh $1 $ROOTDIR $SEARCH`
if [ "$LINKED" ]
then
## don't link
    echo "$1/$SEARCH linked already in $LINKED"
else
## link
    $KUMATUXLINK/link-line.sh $1 $SEARCH $ETCDIR $ROOTDIR
fi
