Magellan Linux

Diff of /trunk/mage/usr/lib/mage/mage4.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2272 by niro, Fri Oct 25 06:48:57 2013 UTC revision 2273 by niro, Fri Oct 25 07:40:31 2013 UTC
# Line 32  export LC_ALL=C Line 32  export LC_ALL=C
32  # sanity checks  # sanity checks
33  [ ! -e ${VIRTUALDB_FILE} ] && touch ${VIRTUALDB_FILE}  [ ! -e ${VIRTUALDB_FILE} ] && touch ${VIRTUALDB_FILE}
34    
35  if [ ! -e ${VIRTUALDB_DEFAULTS} ] && [[ $1 != update ]] && [[ $1 != update-tarball ]]  if [ ! -e ${VIRTUALDB_DEFAULTS} ] &&
36     [[ $1 != update ]] &&
37     [[ $1 != update-rsync ]] &&
38     [[ $1 != update-tarball ]]
39  then  then
40   echo   echo
41   echo "Please choose an profile from the mage tree."   echo "Please choose an profile from the mage tree."
# Line 60  print_usage() Line 63  print_usage()
63   echo "    install         - installs a package"   echo "    install         - installs a package"
64   echo "    srcinstall      - installs a package from source"   echo "    srcinstall      - installs a package from source"
65   echo "    uninstall       - removes a package"   echo "    uninstall       - removes a package"
66   echo "    update          - updates the mage-tree via rsync"   echo "    update          - updates the mage-tree via default sync method"
67     echo "    update-rsync    - updates the mage-tree via rsync"
68   echo "    update-tarball  - updates the mage-tree via a tarball"   echo "    update-tarball  - updates the mage-tree via a tarball"
69   echo "    uppretend       - pretend dependencies for a system upgrade"   echo "    uppretend       - pretend dependencies for a system upgrade"
70   echo "    upgrade         - runs a complete system upgrade"   echo "    upgrade         - runs a complete system upgrade"
# Line 106  if [[ ${METHOD} != upgrade ]] && Line 110  if [[ ${METHOD} != upgrade ]] &&
110   [[ ${METHOD} != uppretend ]] &&   [[ ${METHOD} != uppretend ]] &&
111   [[ ${METHOD} != srcuppretend ]] &&   [[ ${METHOD} != srcuppretend ]] &&
112   [[ ${METHOD} != update ]] &&   [[ ${METHOD} != update ]] &&
113     [[ ${METHOD} != update-rsync ]] &&
114   [[ ${METHOD} != update-tarball ]] &&   [[ ${METHOD} != update-tarball ]] &&
115   [[ ${METHOD} != clean ]] &&   [[ ${METHOD} != clean ]] &&
116   [[ ${METHOD} != version ]] &&   [[ ${METHOD} != version ]] &&
# Line 422  case ${METHOD} in Line 427  case ${METHOD} in
427    
428   update)   update)
429   have_root_privileges || die "You must be root to run this operation."   have_root_privileges || die "You must be root to run this operation."
430     # default to tarball
431     [[ -z ${MAGE_UPDATE_METHOD} ]] && MAGE_UPDATE_METHOD="tarball"
432     case ${MAGE_UPDATE_METHOD} in
433     rsync) syncmage ;;
434     tarball) syncmage_tarball ;;
435     *) die "Unknown MAGE_UPDATE_METHOD defined." ;;
436     esac
437     ;;
438    
439     update-rsync)
440     have_root_privileges || die "You must be root to run this operation."
441   syncmage   syncmage
442   ;;   ;;
443    

Legend:
Removed from v.2272  
changed lines
  Added in v.2273