1 |
#!/bin/bash |
#!/bin/bash |
2 |
# Magellan Linux Installer (mage.sh) |
# Magellan Linux Installer (mage.sh) |
3 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.sh,v 1.17 2008-06-16 09:29:57 niro Exp $ |
# $Id$ |
4 |
|
|
5 |
# default die function |
# default die function |
6 |
die() |
die() |
7 |
{ |
{ |
8 |
echo -e ${COLRED}"Exited ${BASH_SOURCE} at line no ${BASH_LINENO}."${COLDEFAULT} |
xtitleclean |
9 |
|
mqueryfeature "debug" && echo -e ${COLRED}"Exited ${BASH_SOURCE} at line no ${BASH_LINENO}."${COLDEFAULT} |
10 |
echo -e ${COLRED}"$@"${COLDEFAULT} |
echo -e ${COLRED}"$@"${COLDEFAULT} |
11 |
exit 1 |
exit 1 |
12 |
} |
} |
139 |
|
|
140 |
case ${METHOD} in |
case ${METHOD} in |
141 |
download) |
download) |
142 |
|
have_root_privileges || die "You must be root to run this operation." |
143 |
|
|
144 |
# first of all get the right pkg which going to be installed |
# first of all get the right pkg which going to be installed |
145 |
PCAT="$(pname2pcat ${MAGENAME})" |
PCAT="$(pname2pcat ${MAGENAME})" |
146 |
|
|
172 |
;; |
;; |
173 |
|
|
174 |
srcdownload) |
srcdownload) |
175 |
|
have_root_privileges || die "You must be root to run this operation." |
176 |
|
|
177 |
# first of all get the right pkg which going to be installed |
# first of all get the right pkg which going to be installed |
178 |
PCAT="$(pname2pcat ${MAGENAME})" |
PCAT="$(pname2pcat ${MAGENAME})" |
179 |
|
|