mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 14:55:39 +08:00
添加快速进入编译环境脚本
This commit is contained in:
33
quickstart/macOS/x86_64/prepare-php-runtime-macos-x86_64.sh
Normal file
33
quickstart/macOS/x86_64/prepare-php-runtime-macos-x86_64.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -exu
|
||||
__DIR__=$(
|
||||
cd "$(dirname "$0")"
|
||||
pwd
|
||||
)
|
||||
__PROJECT__=$(
|
||||
cd ${__DIR__}/../../
|
||||
pwd
|
||||
)
|
||||
cd ${__PROJECT__}
|
||||
|
||||
|
||||
mkdir -p ${__PROJECT__}/bin/runtime
|
||||
mkdir -p ${__PROJECT__}/var
|
||||
|
||||
cd ${__PROJECT__}/var
|
||||
|
||||
|
||||
|
||||
test -f swoole-cli-v5.0.1-macos-x64.tar.xz || wget -O swoole-cli-v5.0.1-macos-x64.tar.xz https://github.com/swoole/swoole-src/releases/download/v5.0.1/swoole-cli-v5.0.1-macos-x64.tar.xz
|
||||
test -f swoole-cli-v5.0.1-macos-x64.tar || xz -d -k swoole-cli-v5.0.1-macos-x64.tar.xz
|
||||
test -f swoole-cli || tar -xvf swoole-cli-v5.0.1-macos-x64.tar
|
||||
chmod a+x swoole-cli
|
||||
|
||||
test -f composer.phar || wget -O composer.phar https://getcomposer.org/download/2.5.5/composer.phar
|
||||
chmod a+x composer.phar
|
||||
|
||||
mv ${__PROJECT__}/var/swoole-cli ${__PROJECT__}/bin/runtime/php
|
||||
mv ${__PROJECT__}/var/composer.phar ${__PROJECT__}/bin/runtime/composer
|
||||
|
||||
export PATH=${__PROJECT__}/bin/runtime:$PATH
|
||||
24
quickstart/macOS/x86_64/prepare.sh
Normal file
24
quickstart/macOS/x86_64/prepare.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -exu
|
||||
__DIR__=$(
|
||||
cd "$(dirname "$0")"
|
||||
pwd
|
||||
)
|
||||
__PROJECT__=$(
|
||||
cd ${__DIR__}/../
|
||||
pwd
|
||||
)
|
||||
cd ${__PROJECT__}
|
||||
|
||||
export PATH=${__PROJECT__}/bin/runtime:$PATH
|
||||
|
||||
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
|
||||
|
||||
chmod +x bin/spc
|
||||
|
||||
./bin/spc fetch --all --debug
|
||||
|
||||
./bin/spc list-ext
|
||||
|
||||
./bin/spc build "bcmath,openssl,tokenizer,sqlite3,pdo,pdo_sqlite,ftp,curl" --cc=clang --cxx=clang++ --debug
|
||||
Reference in New Issue
Block a user