[ Index ]

PHP Cross Reference of Documentation Magento

title

Body

[close]

/ -> mage (source)

   1  #!/bin/sh
   2  
   3  # REPLACE with your PHP5 binary path (example: /usr/local/php5/bin/php )
   4  #MAGE_PHP_BIN="php"
   5  
   6  MAGE_PHP_SCRIPT="mage.php"
   7  DOWNLOADER_PATH='downloader'
   8  
   9  # initial setup
  10  if test "x$1" = "xmage-setup"; then
  11      echo 'Running initial setup...'
  12  
  13      if test "x$2" != "x"; then
  14          MAGE_ROOT_DIR="$2"
  15      else
  16          MAGE_ROOT_DIR="`pwd`"
  17      fi
  18  
  19      $0 config-set magento_root "$MAGE_ROOT_DIR"
  20      $0 config-set preferred_state beta
  21      $0 channel-add http://connect20.magentocommerce.com/community
  22      exit
  23  fi
  24  
  25  # check that mage pear was initialized
  26  
  27  if test "x$1" != "xconfig-set" &&
  28    test "x$1" != "xconfig-get" &&
  29    test "x$1" != "xconfig-show" &&
  30    test "x$1" != "xchannel-add" &&
  31    test "x`$0 config-get magento_root`" = "x"; then
  32      echo 'Please initialize Magento Connect installer by running:'
  33      echo "$0 mage-setup"
  34      exit;
  35  fi
  36  
  37  # find which PHP binary to use
  38  if test "x$MAGE_PHP_BIN" != "x"; then
  39    PHP="$MAGE_PHP_BIN"
  40  else
  41    PHP=php
  42  fi
  43  
  44  
  45  # get default pear dir of not set
  46  if test "x$MAGE_ROOT_DIR" = "x"; then
  47      MAGE_ROOT_DIR="`pwd`/$DOWNLOADER_PATH"
  48  fi
  49  
  50  exec $PHP -C -q $INCARG -d output_buffering=1 -d variables_order=EGPCS \
  51      -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" \
  52      -d auto_prepend_file="" -d auto_append_file="" \
  53      $MAGE_ROOT_DIR/$MAGE_PHP_SCRIPT "$@"
  54  


Développement Magento e-commerce Montréal
Generated: Thu Feb 21 16:42:07 2013 Cross-referenced by PHPXref 0.7.1