Skip to content

Commit

Permalink
Merge branch 'main' of github.com:jingjingxyk/swoole-install
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Jul 16, 2024
2 parents 691e07f + fb4158b commit 13b4e96
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## --install-php

系统未安装 PHP , 调用系统包管理工具 安装 PHP ,已安装 PHP 将不会执行安装 PHP
选项值: 1

## --swoole-debug

Expand Down Expand Up @@ -40,4 +41,5 @@
## --install-python3

系统未安装 python3 , 调用系统包管理工具 安装 python3 ,已安装 python3 将不会执行安装 python3
选项值: 1

9 changes: 2 additions & 7 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@ init() {
yum update -y
yum install -y which
;;
'ubuntu')
if [ "$GITHUB_ACTIONS" = "true" ] && [ -f /.dockerenv ]; then
sed -i.bak "[email protected]@azure.archive.ubuntu.com@g" /etc/apt/sources.list
sed -i.bak "[email protected]@azure.archive.ubuntu.com@g" /etc/apt/sources.list
fi
;;
'ubuntu') ;;

'alpine')
apk update
apk add bash
Expand All @@ -71,7 +67,6 @@ init() {

init


while [ $# -gt 0 ]; do
case "$1" in
--debug)
Expand Down
13 changes: 10 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ FORCE_INSTALL_PYTHON3=0 # 0 未设置、3 要求安装PHP
while [ $# -gt 0 ]; do
case "$1" in
--mirror)
MIRROR="$2"
if test -n "$2"; then
MIRROR="$2"
fi
;;
--debug)
set -x
Expand All @@ -54,7 +56,10 @@ while [ $# -gt 0 ]; do
VERSION_LATEST=1
;;
--swoole-version)
X_SWOOLE_VERSION="$2"

if test -n "$2"; then
X_SWOOLE_VERSION="$2"
fi
;;
--swoole-debug)
SWOOLE_DEBUG=1
Expand All @@ -71,7 +76,9 @@ while [ $# -gt 0 ]; do
INSTALL_PHPY=1
;;
--phpy-version)
X_PHPY_VERSION="$2"
if test -n "$2"; then
X_PHPY_VERSION="$2"
fi
;;
--install-python3)
if [ "$2" = "1" ]; then
Expand Down

0 comments on commit 13b4e96

Please sign in to comment.