~ubuntu-branches/ubuntu/oneiric/libapache-mod-security/oneiric-updates

« back to all changes in this revision

Viewing changes to apache2/build/install-sh

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Gonzalez Iniesta
  • Date: 2008-08-08 13:31:56 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080808133156-6jqb24apsw787v33
Tags: 2.5.6-1
* The 'Back to the archive!' Release (Closes: #487431)
* Drop '2' from package name, now libapache-mod-security
* New upstream release
  - Includes a new licensing exception that allows binary 
    distribution with licenses not compatible with GPLv2,
    such as Apache's. See MODSECURITY_LICENSING_EXCEPTION
* Removed debian/bug and debian/rules entry to install bug
  handling when out of the archive.
* Bumped Standards-Version to 3.8.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
##
 
3
##  install.sh -- install a program, script or datafile
 
4
##
 
5
##  Based on `install-sh' from the X Consortium's X11R5 distribution
 
6
##  as of 89/12/18 which is freely available.
 
7
##  Cleaned up for Apache's Autoconf-style Interface (APACI)
 
8
##  by Ralf S. Engelschall <rse@apache.org>
 
9
##
 
10
#
 
11
# This script falls under the Apache License.
 
12
# See http://www.apache.org/docs/LICENSE
 
13
 
 
14
 
 
15
#
 
16
#   put in absolute paths if you don't have them in your path;
 
17
#   or use env. vars.
 
18
#
 
19
mvprog="${MVPROG-mv}"
 
20
cpprog="${CPPROG-cp}"
 
21
chmodprog="${CHMODPROG-chmod}"
 
22
chownprog="${CHOWNPROG-chown}"
 
23
chgrpprog="${CHGRPPROG-chgrp}"
 
24
stripprog="${STRIPPROG-strip}"
 
25
rmprog="${RMPROG-rm}"
 
26
 
 
27
#
 
28
#   parse argument line
 
29
#
 
30
instcmd="$mvprog"
 
31
chmodcmd=""
 
32
chowncmd=""
 
33
chgrpcmd=""
 
34
stripcmd=""
 
35
rmcmd="$rmprog -f"
 
36
mvcmd="$mvprog"
 
37
ext=""
 
38
src=""
 
39
dst=""
 
40
while [ "x$1" != "x" ]; do
 
41
    case $1 in
 
42
        -c) instcmd="$cpprog"
 
43
            shift; continue
 
44
            ;;
 
45
        -m) chmodcmd="$chmodprog $2"
 
46
            shift; shift; continue
 
47
            ;;
 
48
        -o) chowncmd="$chownprog $2"
 
49
            shift; shift; continue
 
50
            ;;
 
51
        -g) chgrpcmd="$chgrpprog $2"
 
52
            shift; shift; continue
 
53
            ;;
 
54
        -s) stripcmd="$stripprog"
 
55
            shift; continue
 
56
            ;;
 
57
        -S) stripcmd="$stripprog $2"
 
58
            shift; shift; continue
 
59
            ;;
 
60
        -e) ext="$2"
 
61
            shift; shift; continue
 
62
            ;;
 
63
        *)  if [ "x$src" = "x" ]; then
 
64
                src=$1
 
65
            else
 
66
                dst=$1
 
67
            fi
 
68
            shift; continue
 
69
            ;;
 
70
    esac
 
71
done
 
72
if [ "x$src" = "x" ]; then
 
73
     echo "install.sh: no input file specified"
 
74
     exit 1
 
75
fi
 
76
if [ "x$dst" = "x" ]; then
 
77
     echo "install.sh: no destination specified"
 
78
     exit 1
 
79
fi
 
80
 
 
81
#
 
82
#  If destination is a directory, append the input filename; if
 
83
#  your system does not like double slashes in filenames, you may
 
84
#  need to add some logic
 
85
#
 
86
if [ -d $dst ]; then
 
87
    dst="$dst/`basename $src`"
 
88
fi
 
89
 
 
90
#  Add a possible extension (such as ".exe") to src and dst
 
91
src="$src$ext"
 
92
dst="$dst$ext"
 
93
 
 
94
#  Make a temp file name in the proper directory.
 
95
dstdir=`dirname $dst`
 
96
dsttmp=$dstdir/#inst.$$#
 
97
 
 
98
#  Move or copy the file name to the temp name
 
99
$instcmd $src $dsttmp
 
100
 
 
101
#  And set any options; do chmod last to preserve setuid bits
 
102
if [ "x$chowncmd" != "x" ]; then $chowncmd $dsttmp; fi
 
103
if [ "x$chgrpcmd" != "x" ]; then $chgrpcmd $dsttmp; fi
 
104
if [ "x$stripcmd" != "x" ]; then $stripcmd $dsttmp; fi
 
105
if [ "x$chmodcmd" != "x" ]; then $chmodcmd $dsttmp; fi
 
106
 
 
107
#  Now rename the file to the real destination.
 
108
$rmcmd $dst
 
109
$mvcmd $dsttmp $dst
 
110
 
 
111
exit 0
 
112
 
 
113
#!/bin/sh
 
114
##
 
115
##  install.sh -- install a program, script or datafile
 
116
##
 
117
##  Based on `install-sh' from the X Consortium's X11R5 distribution
 
118
##  as of 89/12/18 which is freely available.
 
119
##  Cleaned up for Apache's Autoconf-style Interface (APACI)
 
120
##  by Ralf S. Engelschall <rse@apache.org>
 
121
##
 
122
#
 
123
# This script falls under the Apache License.
 
124
# See http://www.apache.org/docs/LICENSE
 
125
 
 
126
 
 
127
#
 
128
#   put in absolute paths if you don't have them in your path;
 
129
#   or use env. vars.
 
130
#
 
131
mvprog="${MVPROG-mv}"
 
132
cpprog="${CPPROG-cp}"
 
133
chmodprog="${CHMODPROG-chmod}"
 
134
chownprog="${CHOWNPROG-chown}"
 
135
chgrpprog="${CHGRPPROG-chgrp}"
 
136
stripprog="${STRIPPROG-strip}"
 
137
rmprog="${RMPROG-rm}"
 
138
 
 
139
#
 
140
#   parse argument line
 
141
#
 
142
instcmd="$mvprog"
 
143
chmodcmd=""
 
144
chowncmd=""
 
145
chgrpcmd=""
 
146
stripcmd=""
 
147
rmcmd="$rmprog -f"
 
148
mvcmd="$mvprog"
 
149
ext=""
 
150
src=""
 
151
dst=""
 
152
while [ "x$1" != "x" ]; do
 
153
    case $1 in
 
154
        -c) instcmd="$cpprog"
 
155
            shift; continue
 
156
            ;;
 
157
        -m) chmodcmd="$chmodprog $2"
 
158
            shift; shift; continue
 
159
            ;;
 
160
        -o) chowncmd="$chownprog $2"
 
161
            shift; shift; continue
 
162
            ;;
 
163
        -g) chgrpcmd="$chgrpprog $2"
 
164
            shift; shift; continue
 
165
            ;;
 
166
        -s) stripcmd="$stripprog"
 
167
            shift; continue
 
168
            ;;
 
169
        -S) stripcmd="$stripprog $2"
 
170
            shift; shift; continue
 
171
            ;;
 
172
        -e) ext="$2"
 
173
            shift; shift; continue
 
174
            ;;
 
175
        *)  if [ "x$src" = "x" ]; then
 
176
                src=$1
 
177
            else
 
178
                dst=$1
 
179
            fi
 
180
            shift; continue
 
181
            ;;
 
182
    esac
 
183
done
 
184
if [ "x$src" = "x" ]; then
 
185
     echo "install.sh: no input file specified"
 
186
     exit 1
 
187
fi
 
188
if [ "x$dst" = "x" ]; then
 
189
     echo "install.sh: no destination specified"
 
190
     exit 1
 
191
fi
 
192
 
 
193
#
 
194
#  If destination is a directory, append the input filename; if
 
195
#  your system does not like double slashes in filenames, you may
 
196
#  need to add some logic
 
197
#
 
198
if [ -d $dst ]; then
 
199
    dst="$dst/`basename $src`"
 
200
fi
 
201
 
 
202
#  Add a possible extension (such as ".exe") to src and dst
 
203
src="$src$ext"
 
204
dst="$dst$ext"
 
205
 
 
206
#  Make a temp file name in the proper directory.
 
207
dstdir=`dirname $dst`
 
208
dsttmp=$dstdir/#inst.$$#
 
209
 
 
210
#  Move or copy the file name to the temp name
 
211
$instcmd $src $dsttmp
 
212
 
 
213
#  And set any options; do chmod last to preserve setuid bits
 
214
if [ "x$chowncmd" != "x" ]; then $chowncmd $dsttmp; fi
 
215
if [ "x$chgrpcmd" != "x" ]; then $chgrpcmd $dsttmp; fi
 
216
if [ "x$stripcmd" != "x" ]; then $stripcmd $dsttmp; fi
 
217
if [ "x$chmodcmd" != "x" ]; then $chmodcmd $dsttmp; fi
 
218
 
 
219
#  Now rename the file to the real destination.
 
220
$rmcmd $dst
 
221
$mvcmd $dsttmp $dst
 
222
 
 
223
exit 0
 
224