Debian Codegraph @

builds/install/arch-specific/hpux/misc/changegdslibrarycompatibleLink.sh.in

raw
1 #!/bin/sh
2 #
3 # This library is part of the Firebird project
4 #
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
9 # You may obtain a copy of the Licence at
10 # http://www.gnu.org/licences/lgpl.html
11 #
12 # As a special exception this file can also be included in modules
13 # with other source code as long as that source code has been
14 # released under an Open Source Initiative certificed licence.
15 # More information about OSI certification can be found at:
16 # http://www.opensource.org
17 #
18 # This module is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU Lesser General Public Licence for more details.
22 #
23 # This module was created by members of the firebird development
24 # team. All individual contributions remain the Copyright (C) of
25 # those individuals and all rights are reserved. Contributors to
26 # this file are either listed below or can be obtained from a CVS
27 # history command.
28 #
29 # Created by: Mark O'Donohue <[email protected]>
30 #
31 # Contributor(s):
32 #
33 #
34
35
36 # This script allows the user to change the link on classic for the
37 # client library from
38 #
39 # a) libfbembed.sl original classic direct connection
40 # b) libfbclient.sl multithreaded client connection
41 #
42
43 #------------------------------------------------------------------------
44 # quitIfRealFile
45 # Quit if library is real file, not link somewhere
46
47 quitIfRealFile() {
48
49 fileToCheck=$1
50
51 # Don't worry about symbolic links
52 if [ -L $fileToCheck ]
53 then
54 return
55 fi
56
57 if [ -f $fileToCheck ]
58 then
59 echo "The file $fileToCheck is a real file not just a link to an "
60 echo "existing file. It therefore may be from a"
61 echo "previous firebird or InterBase(r) installation"
62 echo "You will need to manually check the status of this file"
63 echo "and remove it before running this script again"
64 exit
65 fi
66 }
67
68
69 #------------------------------------------------------------------------
70 # printStatus
71
72 printStatus() {
73 prStatus=`ls -l @libdir@/libgds.so | sed 's@^.* /usr@/usr@'`
74 echo $prStatus
75 }
76
77
78
79
80 quitIfRealFile @libdir@/libgds.sl
81 quitIfRealFile @libdir@/libgds.sl.0
82
83
84 cat <<EOF
85 For classic server there are two optional backward compatible client libraries.
86 These are libfbclient.sl and libfbembed.sl.
87
88 libfbclient.sl) enables your client to be multithreaded but must connect to a
89 database via a server.
90 libfbembed.sl) allows the client to directly open the database file, but does
91 not support multithreaded access
92
93 Your current setting is:
94 EOF
95 printStatus
96
97 echo ""
98
99
100 AskQuestion "Which option would you like to choose (client|embed|remove) [client] " "client"
101
102 case $Answer in
103 embed)
104 createLinksForBackCompatibility libfbembed.sl
105 ;;
106 client)
107 createLinksForBackCompatibility libfbclient.sl
108 ;;
109 remove)
110 removeLinks
111 ;;
112 *)
113 echo "Unknown option $Answer chosen"
114 ;;
115 esac