Magellan Linux

Contents of /trunk/mlivecdbuild/files/mage-src/setup_mage.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 27 - (show annotations) (download) (as text)
Wed Jan 5 05:36:10 2005 UTC (19 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 1454 byte(s)
mlivecdbuild-0.3.6-r7 import

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.6
17 PBUILDEXT=r7
18
19 #standart die function
20 die() {
21 echo "ERROR [$(basename $0)]: $@"
22 exit 1
23 }
24
25 if [ -z "${PREFIX}" ]
26 then
27 die "no \${PREFIX} given ..."
28 fi
29
30 if [ -z "${MY_SRCDIR}" ]
31 then
32 die "no \${MY_SRCDIR} given ..."
33 fi
34
35 if [ -z "${MY_MAGERC}" ]
36 then
37 die "no \${MY_MAGERC} given ..."
38 fi
39
40 if [ -z "${MY_MAGEPROFILE}" ]
41 then
42 die "no \${MY_MAGEPROFILE} given ..."
43 fi
44
45 #source equivalent smage-file
46 source ${MY_SRCDIR}/${MY_PNAME}-${MY_PVER}-${PBUILDEXT}.smage2 || die 1
47
48 #create temporary directory
49 install -d ${PREFIX}/temp || die 2
50
51 #unpack source
52 tar --no-same-owner -xvjf \
53 ${MY_SRCDIR}/${MY_PNAME}-${MY_PVER}-${PBUILDEXT}.tar.bz2 -C ${PREFIX}/temp || die 3
54
55
56 #setup some general needed directories
57 source ${MY_MAGERC} || die 4
58
59 install -d ${PREFIX}/${PKGDIR} || die 5
60 install -d ${PREFIX}/${BUILDDIR} || die 6
61 install -d ${PREFIX}/${INSTALLDB} || die 7
62 install -d ${PREFIX}/${MAGEDIR} || die 8
63
64
65 #compatibilty issues; override these var with right settings
66 BINDIR=${PREFIX}
67 SRCDIR=${PREFIX}/temp/${PNAME}-${PVER}-${PBUILDEXT}
68
69 #install mage
70 src_install || die 9
71
72 #install mage.rc
73 install -m0644 ${MY_MAGERC} ${PREFIX}/etc || die 10
74
75 #install mage profile
76 ln -s ${MAGEDIR}/profiles/${MY_MAGEPROFILE} ${PREFIX}/etc/mage-profile || die 11

Properties

Name Value
svn:executable *