]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/install-default-backend.in
Tweak script
[bacula/bacula] / bacula / src / cats / install-default-backend.in
1 #!/bin/sh
2
3 LIBTOOL="@BUILD_DIR@/libtool"
4
5 if [ $# -lt 3 ]; then
6    echo "Usage: $0 <default_backend> <library_version> <install_dir>"
7    exit 1
8 fi
9
10 default_backend=$1
11 library_version=$2
12 install_dir=$3
13
14 #
15 # Find out what the shared lib extension is for this platform.
16 #
17 eval `${LIBTOOL} --config | grep shrext_cmds`
18 if [ -z "${shrext_cmds}" ]; then
19    echo "Failed to determine default shared library extension"
20    exit 1
21 fi
22
23 if [ -f ${install_dir}/libbaccats-${default_backend}-${library_version}${shrext_cmds} ]; then
24    #
25    # Create a default catalog library pointing to one of the shared libs.
26    #
27    rm -f ${install_dir}/libbaccats-${library_version}${shrext_cmds}
28    ln -s ${install_dir}/libbaccats-${default_backend}-${library_version}${shrext_cmds} \
29          ${install_dir}/libbaccats-${library_version}${shrext_cmds}
30 fi
31
32 exit 0