#!/bin/sh
#set -e

. $KUMATUXBIN/kumatux.org-vars

SEARCH=info
ROOTDIR=$KUMATUXROOTINFO
ETCDIR=$KUMATUXETCINFO

## 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

#if [ -d $1/info ]
#then
#    for FILE in `ls $1/info/*`
#    do
##	sudo install-info $FILE /usr/share/info/dir
#	install-info $FILE
#    done
#fi

SEARCH="share/info"

## 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

#if [ -d $1/share/info ]
#then
#    for FILE in `ls $1/share/info/*`
#    do
#	echo $FILE
##	sudo install-info $FILE /usr/share/info/dir
#	install-info $FILE
#    done
#fi

