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

Last change on this file since 2648 was 2648, checked in by Bruno Cornec, 10 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.3 KB
Line 
1#!/bin/bash
2#
3# $Id: post-install.sh 2648 2010-06-13 10:36:32Z bruno $
4#
5
6if [ "_$PREFIX" != "_" ]; then
7    local=${HEAD}$PREFIX
8    sublocal=$PREFIX
9    if [ "_$CONFDIR" != "_" ]; then
10        conf=${HEAD}$CONFDIR/PBPKG
11        subconf=$CONFDIR/PBPKG
12    else
13        echo "CONFDIR should be defined if PREFIX is defined"
14        exit -1
15    fi
16else
17    local=/usr/local
18    sublocal=$local
19    conf=$local/etc/PBPKG
20    subconf=$conf
21fi
22
23if [ _"$CACHEDIR" = _"" ]; then
24    CACHEDIR=$local/var/cache/PBPKG
25else
26    CACHEDIR=${HEAD}$CACHEDIR
27fi
28sublocalshare="$local/share/PBPKG"
29sublocallib="$local/lib/PBPKG"
30
31MRMINIVER=PBVER
32MRMINIREV=PBREV
33ARCH=`/bin/uname -m`
34echo "PBPKG ${MRMINIVER}-r${MRMINIREV} will be installed under $local"
35
36echo "Creating target directories ..."
37install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR
38
39echo "Copying files ..."
40cp -a etc/PBPKG.conf $conf
41#cp -af rootfs $sublocallib
42#chmod 755 $sublocallib/rootfs/sbin/*
43#install -m 644 msg-txt dev.tgz $sublocallib
44#install -m 644 deplist.txt udev.files proliant.files $conf
45
46# Substitute variables for mrmini
47sed -i -e "s~^MRMINI_PREFIX=XXX~MRMINI_PREFIX=$sublocal~" -e "s~^MRMINI_CONF=YYY~MRMINI_CONF=$subconf~" -e "s~^MRMINI_LIB=LLL~MRMINI_LIB=$sublocallib~" $local/bin/PBPKG
48#sed -i -e "s~= "YYY"~= "$subconf"~" $local/bin/mrmini-bkphw
49
50if [ "$PKGBUILDMRMINI" != "true" ]; then
51    chown -R root:root $sublocallib $conf
52fi
53
54exit 0
Note: See TracBrowser for help on using the repository browser.