1 |
#!/bin/bash |
#!/bin/bash |
2 |
# Magellan Linux Installer Functions (mage.functions.sh) |
# Magellan Linux Installer Functions (mage.functions.sh) |
3 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.18 2006-04-27 11:52:53 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.23 2006-12-30 11:39:32 niro Exp $ |
4 |
|
|
5 |
mage_setup() |
mage_setup() |
6 |
{ |
{ |
1187 |
local i |
local i |
1188 |
for i in ${RSYNC} |
for i in ${RSYNC} |
1189 |
do |
do |
1190 |
rsync \ |
rsync ${RSYNC_FETCH_OPTIONS} ${i} ${MAGEDIR} |
|
--recursive \ |
|
|
--links \ |
|
|
--perms \ |
|
|
--times \ |
|
|
--devices \ |
|
|
--timeout=600 \ |
|
|
--verbose \ |
|
|
--compress \ |
|
|
--progress \ |
|
|
--stats \ |
|
|
--delete \ |
|
|
--delete-after \ |
|
|
${i} ${MAGEDIR} |
|
1191 |
if [[ $? = 0 ]] |
if [[ $? = 0 ]] |
1192 |
then |
then |
1193 |
break |
break |
1708 |
{ |
{ |
1709 |
local i |
local i |
1710 |
|
|
1711 |
if [ -n "$@" ] |
if [[ -n $@ ]] |
1712 |
then |
then |
1713 |
for i in $@ |
for i in $@ |
1714 |
do |
do |
1750 |
echo -en ${COLRED}"An update for your packetmanager is available. "${COLDEFAULT} |
echo -en ${COLRED}"An update for your packetmanager is available. "${COLDEFAULT} |
1751 |
echo -e ${COLBLUE}"[ ${newest_mage} ]"${COLDEFAULT} |
echo -e ${COLBLUE}"[ ${newest_mage} ]"${COLDEFAULT} |
1752 |
echo "It is recommened to install this newer version" |
echo "It is recommened to install this newer version" |
1753 |
echo "or your current system installation may brake." |
echo "or your current system installation may break." |
1754 |
echo |
echo |
1755 |
echo -en "Please update mage by running " |
echo -en "Please update mage by running " |
1756 |
echo -e ${COLGREEN}"'mage install mage'"${COLDEFAULT} |
echo -e ${COLGREEN}"'mage install mage'"${COLDEFAULT} |
2157 |
smage2file=${SMAGESCRIPTSDIR}/${pname}/${pname}-${pver}-${pbuild}.smage2 |
smage2file=${SMAGESCRIPTSDIR}/${pname}/${pname}-${pver}-${pbuild}.smage2 |
2158 |
if [ -f "${smage2file}" ] |
if [ -f "${smage2file}" ] |
2159 |
then |
then |
2160 |
|
echo -e " ${COLBLUE}***${COLDEFAULT} building package from source ... " |
2161 |
smage2 ${smage2file} || die "compile failed" |
smage2 ${smage2file} || die "compile failed" |
2162 |
else |
else |
2163 |
echo |
echo |
2171 |
if [[ ${PKGTYPE} != virtual ]] && \ |
if [[ ${PKGTYPE} != virtual ]] && \ |
2172 |
[[ ${PKGTYPE} != sources ]] |
[[ ${PKGTYPE} != sources ]] |
2173 |
then |
then |
2174 |
# show a verbose message on src-install |
echo -e " ${COLBLUE}***${COLDEFAULT} merging files into system ... " |
|
if [[ ${src_install} = true ]] |
|
|
then |
|
|
echo -ne "${COLBLUE} *** ${COLDEFAULT}" |
|
|
echo -ne "merging files: " |
|
|
echo -ne "${COLBLUE}${pcat}/${COLDEFAULT}" |
|
|
echo -e "${COLGREEN}${pname}-${pver}-${pbuild}${COLDEFAULT}" |
|
|
fi |
|
2175 |
build_doinstall ${PKGNAME} |
build_doinstall ${PKGNAME} |
2176 |
fi |
fi |
2177 |
|
|
2530 |
local ipbuild |
local ipbuild |
2531 |
|
|
2532 |
# only names no versions |
# only names no versions |
2533 |
result="$(find ${MAGEDIR} -mindepth 2 -maxdepth 2 -type d -name '*'${string}'*')" |
result="$(find ${MAGEDIR} -mindepth 2 -maxdepth 2 -type d -name '*'${string}'*'| sed '/profiles/d' | sed '/includes/d')" |
2534 |
#result="$(find ${MAGEDIR} -type f -name '*'${string}'*'.mage | sort)" |
#result="$(find ${MAGEDIR} -type f -name '*'${string}'*'.mage | sort)" |
2535 |
|
|
2536 |
# nothing found |
# nothing found |