Switch to unified view

a/src/recollinstall b/src/recollinstall
...
...
8
    echo $*
8
    echo $*
9
    exit 1
9
    exit 1
10
}
10
}
11
usage()
11
usage()
12
{
12
{
13
    echo 'Usage (binaries): installrecoll <dir>, ie: installrecoll /usr/local'
13
    echo 'Usage (common files): recollinstall <dir>, ie: recollinstall /usr/local'
14
    fatal 'Usage (personal config): installrecoll'
14
    fatal 'Usage (personal config): recollinstall'
15
}
15
}
16
16
17
INSTALL=${INSTALL:=install}
17
INSTALL=${INSTALL:=install}
18
18
19
if test $# = 1 ; then
19
if test $# = 1 ; then
...
...
21
   PREFIX=$1
21
   PREFIX=$1
22
22
23
   echo "Installing to $PREFIX"
23
   echo "Installing to $PREFIX"
24
24
25
   test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
25
   test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
26
        " You need to build first."
26
        " You need to build first (type 'make')."
27
27
28
   test -d ${PREFIX}/bin || mkdir ${PREFIX}/bin || exit 1
28
   for d in ${PREFIX} \
29
      ${PREFIX}/bin \
30
      ${PREFIX}/share \
31
      ${PREFIX}/share/recoll \
32
      ${PREFIX}/share/recoll/examples \
33
      ${PREFIX}/share/recoll/images 
34
   do
35
     test -d $d || mkdir $d || exit 1
36
   done
37
38
29
   ${INSTALL} qtgui/recoll index/recollindex recollinstall $PREFIX/bin \
39
   ${INSTALL} qtgui/recoll index/recollindex recollinstall $PREFIX/bin \
30
          || exit 1
40
          || exit 1
31
   test -d ${PREFIX}/share || mkdir ${PREFIX}/share
41
32
   test -d ${PREFIX}/share/examples || mkdir ${PREFIX}/share/examples
33
   test -d ${PREFIX}/share/examples/recoll || \
34
  mkdir ${PREFIX}/share/examples/recoll
35
   ${INSTALL} filters/rcl* ${PREFIX}/share/examples/recoll || exit 1
42
   ${INSTALL} filters/rcl* ${PREFIX}/share/recoll/examples/ || exit 1
43
36
   ${INSTALL} sampleconf/recoll.conf sampleconf/mimeconf sampleconf/mimemap \
44
   ${INSTALL} sampleconf/recoll.conf sampleconf/mimeconf sampleconf/mimemap \
37
          ${PREFIX}/share/examples/recoll || exit 1
45
          ${PREFIX}/share/recoll/examples/ || exit 1
46
47
   ${INSTALL} qtgui/mtpics/*.png ${PREFIX}/share/recoll/images || exit 1
38
48
39
   exit 0
49
   exit 0
40
50
41
else
51
else
42
52