-
Notifications
You must be signed in to change notification settings - Fork 30
/
mage
executable file
·78 lines (66 loc) · 2.17 KB
/
mage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
#
# Magento
#
# NOTICE OF LICENSE
#
# This source file is subject to the Open Software License (OSL 3.0)
# that is bundled with this package in the file LICENSE.txt.
# It is also available through the world-wide-web at this URL:
# http://opensource.org/licenses/osl-3.0.php
# If you did not receive a copy of the license and are unable to
# obtain it through the world-wide-web, please send an email
# to [email protected] so we can send you a copy immediately.
#
# DISCLAIMER
#
# Do not edit or add to this file if you wish to upgrade Magento to newer
# versions in the future. If you wish to customize Magento for your
# needs please refer to http://www.magento.com for more information.
#
# @category Mage
# @package Mage
# @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
#
# REPLACE with your PHP5 binary path (example: /usr/local/php5/bin/php )
#MAGE_PHP_BIN="php"
MAGE_PHP_SCRIPT="mage.php"
DOWNLOADER_PATH='downloader'
# initial setup
if test "x$1" = "xmage-setup"; then
echo 'Running initial setup...'
if test "x$2" != "x"; then
MAGE_ROOT_DIR="$2"
else
MAGE_ROOT_DIR="`pwd`"
fi
$0 config-set magento_root "$MAGE_ROOT_DIR"
$0 config-set preferred_state beta
$0 channel-add http://connect20.magentocommerce.com/community
exit
fi
# check that mage pear was initialized
if test "x$1" != "xconfig-set" &&
test "x$1" != "xconfig-get" &&
test "x$1" != "xconfig-show" &&
test "x$1" != "xchannel-add" &&
test "x`$0 config-get magento_root`" = "x"; then
echo 'Please initialize Magento Connect installer by running:'
echo "$0 mage-setup"
exit;
fi
# find which PHP binary to use
if test "x$MAGE_PHP_BIN" != "x"; then
PHP="$MAGE_PHP_BIN"
else
PHP=php
fi
# get default pear dir of not set
if test "x$MAGE_ROOT_DIR" = "x"; then
MAGE_ROOT_DIR="`pwd`/$DOWNLOADER_PATH"
fi
exec $PHP -C -q $INCARG -d output_buffering=1 -d variables_order=EGPCS \
-d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" \
-d auto_prepend_file="" -d auto_append_file="" \
$MAGE_ROOT_DIR/$MAGE_PHP_SCRIPT "$@"