Last change
on this file since 2648 was 2648, checked in by Bruno Cornec, 14 years ago |
r3873@localhost: bruno | 2010-06-10 12:28:15 +0200
- Big renaming in progress mindi => mrmini
|
-
Property svn:keywords
set to
Id
|
File size:
1.4 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # $Id: post-install.sh 2648 2010-06-13 10:36:32Z bruno $
|
---|
4 | #
|
---|
5 |
|
---|
6 | if [ "_$PREFIX" != "_" ]; then
|
---|
7 | local=${HEAD}$PREFIX
|
---|
8 | sublocal=$PREFIX
|
---|
9 | if [ "_$CONFDIR" != "_" ]; then
|
---|
10 | conf=${HEAD}$CONFDIR/PBPROJ
|
---|
11 | subconf=$CONFDIR/PBPROJ
|
---|
12 | else
|
---|
13 | echo "CONFDIR should be defined if PREFIX is defined"
|
---|
14 | exit -1
|
---|
15 | fi
|
---|
16 | else
|
---|
17 | local=/usr/local
|
---|
18 | sublocal=$local
|
---|
19 | conf=$local/etc/PBPROJ
|
---|
20 | subconf=$conf
|
---|
21 | fi
|
---|
22 |
|
---|
23 | if [ _"$CACHEDIR" = _"" ]; then
|
---|
24 | CACHEDIR=$local/var/cache/PBPROJ
|
---|
25 | else
|
---|
26 | CACHEDIR=${HEAD}$CACHEDIR
|
---|
27 | fi
|
---|
28 | sublocalshare="$local/share/PBPROJ"
|
---|
29 | sublocallib="$local/lib/PBPROJ"
|
---|
30 |
|
---|
31 | MRVER=PBVER
|
---|
32 | MRREV=PBREV
|
---|
33 | ARCH=`/bin/uname -m`
|
---|
34 | echo "PBPROJ modules ${MRVER}-r${MRREV} will be installed under $local"
|
---|
35 |
|
---|
36 | echo "Creating target directories ..."
|
---|
37 | install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR
|
---|
38 |
|
---|
39 | echo "Copying files ..."
|
---|
40 | cp etc/PBPROJ.conf $conf
|
---|
41 | cat > $HEAD$PERLDIR/MondoRescue/DynConf.pm << EOF
|
---|
42 | #!/usr/bin/perl -w
|
---|
43 | #
|
---|
44 | # Declare variables for the MondoRescue project
|
---|
45 | # This module has been generated at installation time
|
---|
46 | # Do not modify without good reasons.
|
---|
47 | #
|
---|
48 | package MondoRescue::DynConf;
|
---|
49 |
|
---|
50 | use strict;
|
---|
51 |
|
---|
52 | # Inherit from the "Exporter" module which handles exporting functions.
|
---|
53 |
|
---|
54 | use Exporter;
|
---|
55 |
|
---|
56 | # Export, by default, all the functions into the namespace of
|
---|
57 | # any code which uses this module.
|
---|
58 | our @ISA = qw(Exporter);
|
---|
59 | our @EXPORT = qw(mr_dynconf_init);
|
---|
60 |
|
---|
61 | # Returns in order
|
---|
62 | # the CONFDIR
|
---|
63 | # the LOCALDIR
|
---|
64 | sub mr_dynconf_init {
|
---|
65 |
|
---|
66 | return("$subconf","$sublocal","PBPROJ");
|
---|
67 | }
|
---|
68 | 1;
|
---|
69 | EOF
|
---|
70 |
|
---|
71 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.