~ubuntu-branches/ubuntu/utopic/dh-make-php/utopic

« back to all changes in this revision

Viewing changes to configure

  • Committer: Bazaar Package Importer
  • Author(s): Uwe Steinmann
  • Date: 2005-11-25 11:04:57 UTC
  • Revision ID: james.westby@ubuntu.com-20051125110457-hp4c6t4r7s42nd65
Tags: upstream-0.0.12
ImportĀ upstreamĀ versionĀ 0.0.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
# usage() {{{
 
4
# print summary of options
 
5
usage()
 
6
{
 
7
        cat <<eof
 
8
This is configuration script for dh-make-php
 
9
 
 
10
Usage: configure [option]
 
11
 
 
12
Options:
 
13
  --help          show this usage information
 
14
  --prefix        set base directory for installation
 
15
eof
 
16
}
 
17
# }}}
 
18
 
 
19
if [ $# = 0 ]; then
 
20
        usage
 
21
        exit 0
 
22
fi
 
23
 
 
24
while
 
25
        case $1 in
 
26
                --help|-h) # print usage
 
27
                        usage
 
28
                        exit 0
 
29
                        ;;
 
30
                --prefix) # set install prefix
 
31
                        PREFIX="$2"; shift
 
32
                        ;;
 
33
                "") break;;
 
34
                *)
 
35
                        echo "configure: unknown option \`$1'." >&2
 
36
                        exit
 
37
                        ;;
 
38
        esac
 
39
do test $# -gt 0 && shift; done
 
40
 
 
41
VERSION=`cat VERSION`
 
42
sed -e "s:^PREFIX=.*$:PREFIX=$PREFIX:" -e "s:^PROGVERSION=.*$:PROGVERSION=$VERSION:" dh-make-pecl > dh-make-pecl.new
 
43
mv dh-make-pecl.new dh-make-pecl
 
44
chmod 755 dh-make-pecl
 
45
sed -e "s:^PREFIX=.*$:PREFIX=$PREFIX:" -e "s:^PROGVERSION=.*$:PROGVERSION=$VERSION:" dh-make-pear > dh-make-pear.new
 
46
mv dh-make-pear.new dh-make-pear
 
47
chmod 755 dh-make-pear
 
48
 
 
49
echo "Prefix set to '${PREFIX}'"
 
50
echo ""
 
51
echo "Run 'make install' to install the programm."