source: MondoRescue/devel/mr/post-install.sh@ 2648

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
RevLine 
[179]1#!/bin/bash
[916]2#
3# $Id: post-install.sh 2648 2010-06-13 10:36:32Z bruno $
4#
[1]5
[184]6if [ "_$PREFIX" != "_" ]; then
[936]7 local=${HEAD}$PREFIX
8 sublocal=$PREFIX
9 if [ "_$CONFDIR" != "_" ]; then
[2539]10 conf=${HEAD}$CONFDIR/PBPROJ
11 subconf=$CONFDIR/PBPROJ
[936]12 else
13 echo "CONFDIR should be defined if PREFIX is defined"
14 exit -1
15 fi
[179]16else
17 local=/usr/local
[936]18 sublocal=$local
[2539]19 conf=$local/etc/PBPROJ
[936]20 subconf=$conf
[179]21fi
22
[2149]23if [ _"$CACHEDIR" = _"" ]; then
[2539]24 CACHEDIR=$local/var/cache/PBPROJ
[2149]25else
26 CACHEDIR=${HEAD}$CACHEDIR
27fi
[2539]28sublocalshare="$local/share/PBPROJ"
29sublocallib="$local/lib/PBPROJ"
[2149]30
[2539]31MRVER=PBVER
32MRREV=PBREV
[1565]33ARCH=`/bin/uname -m`
[2539]34echo "PBPROJ modules ${MRVER}-r${MRREV} will be installed under $local"
[179]35
36echo "Creating target directories ..."
[2538]37install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR
[1]38
[2539]39echo "Copying files ..."
40cp etc/PBPROJ.conf $conf
[2540]41cat > $HEAD$PERLDIR/MondoRescue/DynConf.pm << EOF
[2539]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#
48package MondoRescue::DynConf;
[179]49
[2539]50use strict;
[237]51
[2539]52# Inherit from the "Exporter" module which handles exporting functions.
53
54use Exporter;
55
56# Export, by default, all the functions into the namespace of
57# any code which uses this module.
58our @ISA = qw(Exporter);
59our @EXPORT = qw(mr_dynconf_init);
60
61# Returns in order
62# the CONFDIR
63# the LOCALDIR
64sub mr_dynconf_init {
65
[2540]66return("$subconf","$sublocal","PBPROJ");
[2539]67}
681;
69EOF
70
[1]71exit 0
Note: See TracBrowser for help on using the repository browser.