1 |
#!/bin/sh |
#!/bin/sh |
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.9 2005-12-01 12:40:21 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.sh,v 1.11 2005-12-04 17:12:07 niro Exp $ |
4 |
|
|
5 |
# default die function |
# default die function |
6 |
die() |
die() |
21 |
source ${MLIBDIR}/mage4.functions.sh || \ |
source ${MLIBDIR}/mage4.functions.sh || \ |
22 |
die "mage functions missing" |
die "mage functions missing" |
23 |
|
|
|
# for tests only |
|
|
#source /home/tjoke/alx-cvs/magellan-src/mage/usr/lib/mage/mage.rc.global |
|
|
#source /etc/mage.rc |
|
|
#source /home/tjoke/alx-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh |
|
|
#MLIBDIR=/home/tjoke/alx-cvs/magellan-src/mage/usr/lib/mage |
|
|
|
|
24 |
## only for tests -> normally in /etc/rc.d/init.d/functions |
## only for tests -> normally in /etc/rc.d/init.d/functions |
25 |
COLRED="\033[1;6m\033[31m" |
COLRED="\033[1;6m\033[31m" |
26 |
COLGREEN="\033[1;6m\033[32m" |
COLGREEN="\033[1;6m\033[32m" |
63 |
fi |
fi |
64 |
|
|
65 |
# default messages |
# default messages |
66 |
showversion() { |
showversion() |
67 |
|
{ |
68 |
local MAGEVERSION="$(< ${MLIBDIR}/version)" |
local MAGEVERSION="$(< ${MLIBDIR}/version)" |
69 |
|
|
70 |
echo -en "Magellan Package Manager v${MAGEVERSION} " |
echo -en "Magellan Package Manager v${MAGEVERSION} " |
71 |
echo -e "-- Niels Rogalla (niro@magellan-linux.de)" |
echo -e "-- Niels Rogalla (niro@magellan-linux.de)" |
72 |
} |
} |
73 |
|
|
74 |
print_usage(){ |
print_usage() |
75 |
showversion |
{ |
76 |
echo |
#showversion |
77 |
|
#echo |
78 |
echo "Usage: $(basename $0) [option] pkgname ..." |
echo "Usage: $(basename $0) [option] pkgname ..." |
79 |
echo "Options:" |
echo "Options:" |
80 |
echo " pretend - pretends dependencies of a package" |
echo " pretend - pretends dependencies of a package" |
98 |
# echo "NOINSTALL=yes $(basename $0) srcinstall PACKAGE" |
# echo "NOINSTALL=yes $(basename $0) srcinstall PACKAGE" |
99 |
# echo "Builds a Package with its dependencies, but won't install anything." |
# echo "Builds a Package with its dependencies, but won't install anything." |
100 |
# echo |
# echo |
101 |
echo "USE_UNSTABLE=true $(basename $0) [src]install PACKAGE" |
echo "MAGE_DISTRIBUTION=unstable $(basename $0) [src]install PACKAGE" |
102 |
echo "Overrides stable packages; you can install packages that are marked unstable." |
echo "Overrides stable packages; you can install packages that are marked unstable." |
103 |
echo |
echo |
104 |
echo "USE_TESTING=true $(basename $0) [src]install PACKAGE" |
echo "MAGE_DISTRIBUTION=testing $(basename $0) [src]install PACKAGE" |
105 |
echo "Overrides stable packages; you can install packages that are marked testing." |
echo "Overrides stable packages; you can install packages that are marked testing." |
106 |
echo |
echo |
107 |
echo "NOCOLORS=true $(basename $0) [src]install PACKAGE" |
echo "NOCOLORS=true $(basename $0) [src]install PACKAGE" |
392 |
;; |
;; |
393 |
|
|
394 |
version) |
version) |
395 |
showversion |
# showversion |
396 |
|
exit 0 |
397 |
;; |
;; |
398 |
|
|
399 |
regen-mage-tree) |
regen-mage-tree) |