Parent: [95c898] (diff)

Child: [513599] (diff)

Download this file

recollinstall.in    48 lines (37 with data), 1.2 kB

#!/bin/sh
# Install recoll files.

fatal()
{
    echo $*
    exit 1
}
usage()
{
    fatal 'Usage: recollinstall <dir>, ie: recollinstall /usr/local'
}

INSTALL=${INSTALL:=install -c}

# Install commands and example config to target directory
PREFIX=$1

echo "Installing to $PREFIX"

test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
     " You need to build first (type 'make')."

for d in ${PREFIX} \
	    ${PREFIX}/bin \
	    ${PREFIX}/share \
	    ${PREFIX}/share/recoll \
	    ${PREFIX}/share/recoll/examples \
	    ${PREFIX}/share/recoll/filters \
	    ${PREFIX}/share/recoll/images \
	    ${PREFIX}/share/recoll/translations
do
  test -d $d || mkdir $d || exit 1
done

${INSTALL} qtgui/recoll index/recollindex $PREFIX/bin || exit 1

${INSTALL} filters/rcl* ${PREFIX}/share/recoll/filters/ || exit 1
chmod a+x ${PREFIX}/share/recoll/filters/rcl* || exit 1
# Clean up possible old filters in examples
rm -f ${PREFIX}/share/recoll/examples/rcl*

${INSTALL} sampleconf/recoll.conf sampleconf/mimeconf sampleconf/mimemap \
		    ${PREFIX}/share/recoll/examples/ || exit 1

${INSTALL} qtgui/mtpics/*.png ${PREFIX}/share/recoll/images || exit 1
${INSTALL} qtgui/recoll*.qm ${PREFIX}/share/recoll/translations || exit 1