Magellan Linux

Contents of /trunk/bootstrap/mage-src/setup_mage.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 189 - (show annotations) (download) (as text)
Thu Aug 18 05:32:05 2005 UTC (18 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 1427 byte(s)
updated to mage-0.3.7-r3

1 #!/bin/bash
2
3
4 # installs mage directly from src; needed for livecds
5
6 # Niels Rogalla <niro@magellan-linux.de>
7
8
9 PREFIX=$1
10 MY_SRCDIR=$2
11 MY_MAGERC=$3
12 MY_MAGEPROFILE=$4
13
14 # which version ?
15 MY_PNAME=mage
16 MY_PVER=0.3.7
17 PBUILDEXT=r3
18
19 # standard die function
20 die() {
21 echo "ERROR [$(basename $0)]: $@"
22 exit 1
23 }
24
25 # some neccessary checks
26 [ -z "${PREFIX}" ] && die "no \${PREFIX} given ..."
27 [ -z "${MY_SRCDIR}" ] && die "no \${MY_SRCDIR} given ..."
28 [ -z "${MY_MAGERC}" ] && die "no \${MY_MAGERC} given ..."
29 [ -z "${MY_MAGEPROFILE}" ] && die "no \${MY_MAGEPROFILE} given ..."
30
31
32 # source equivalent smage-file
33 source ${MY_SRCDIR}/${MY_PNAME}-${MY_PVER}-${PBUILDEXT}.smage2 || die
34
35 # create temporary directory
36 install -d ${PREFIX}/tmp || die
37
38 # unpack source
39 tar --no-same-owner -xvjf \
40 ${MY_SRCDIR}/${MY_PNAME}-${MY_PVER}-${PBUILDEXT}.tar.bz2 \
41 -C ${PREFIX}/tmp || die
42
43
44 # setup some general needed directories
45 source ${MY_MAGERC} || die
46
47 install -d ${PREFIX}/${PKGDIR} || die
48 install -d ${PREFIX}/${BUILDDIR} || die
49 install -d ${PREFIX}/${INSTALLDB} || die
50 install -d ${PREFIX}/${MAGEDIR} || die
51
52
53 # compatibilty issues; override these var with right settings
54 BINDIR=${PREFIX}
55 SRCDIR=${PREFIX}/tmp/${PNAME}-${PVER}-${PBUILDEXT}
56
57 # install mage
58 src_install || die
59
60 # install mage.rc
61 install -m0644 ${MY_MAGERC} ${PREFIX}/etc || die
62
63 # install mage profile
64 ln -s ${MAGEDIR}/profiles/${MY_MAGEPROFILE} ${PREFIX}/etc/mage-profile || die

Properties

Name Value
svn:executable *