#!/bin/bash
#set -e

. optvars

SEARCH=info
ROOTDIR=$KUMATUXROOTINFO
ETCDIR=$KUMATUXETCINFO

$KUMATUXLINK/link-line.sh $1 $SEARCH $ETCDIR $ROOTDIR

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"

$KUMATUXLINK/link-line.sh $1 $SEARCH $ETCDIR $ROOTDIR

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
