Parent:
[e062f4]
(diff)
Child:
[a448a0]
(diff)
Download this file
recollinstall.in
52 lines (40 with data), 1.3 kB
#!/bin/sh
# Install recoll files.
fatal()
{
echo $*
exit 1
}
usage()
{
fatal 'Usage: recollinstall <dir>, ie: recollinstall /usr/local'
}
test $# = 1 || usage
INSTALL=${INSTALL:=install -c}
STRIP=${STRIP:=strip}
# 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
${STRIP} $PREFIX/bin/recoll $PREFIX/bin/recollindex
${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