Skip to content

Commit

Permalink
update setup php swoole-cli runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Sep 17, 2024
1 parent c72adbe commit 55cfd40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion setup-php-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ if [ $OS = 'windows' ]; then
else
test -f ${APP_RUNTIME}.tar.xz || curl -LSo ${APP_RUNTIME}.tar.xz ${APP_DOWNLOAD_URL}
test -f ${APP_RUNTIME}.tar || xz -d -k ${APP_RUNTIME}.tar.xz
test -f swoole-cli || tar -xvf ${APP_RUNTIME}.tar
test -f swoole-cli && rm -f swoole-cli
tar -xvf ${APP_RUNTIME}.tar
chmod a+x swoole-cli
cp -f ${__PROJECT__}/var/runtime/swoole-cli ${__PROJECT__}/bin/runtime/php
fi
Expand Down Expand Up @@ -161,4 +162,8 @@ echo " alias php='php -d curl.cainfo=${__PROJECT__}/bin/runtime/cacert.pem -d op
echo " OR "
echo " alias php='php -c ${__PROJECT__}/bin/runtime/php.ini' "
echo " "
test $OS="macos" && echo "sudo xattr -d com.apple.quarantine ${__PROJECT__}/bin/runtime/php"
echo " "
export PATH="${__PROJECT__}/bin/runtime:$PATH"
php -v

7 changes: 6 additions & 1 deletion setup-swoole-cli-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ if [ $OS = 'windows' ]; then
else
test -f ${APP_RUNTIME}.tar.xz || curl -LSo ${APP_RUNTIME}.tar.xz ${APP_DOWNLOAD_URL}
test -f ${APP_RUNTIME}.tar || xz -d -k ${APP_RUNTIME}.tar.xz
test -f swoole-cli || tar -xvf ${APP_RUNTIME}.tar
test -f swoole-cli && rm -f swoole-cli
tar -xvf ${APP_RUNTIME}.tar
chmod a+x swoole-cli
cp -f ${__PROJECT__}/var/runtime/swoole-cli ${__PROJECT__}/bin/runtime/swoole-cli
fi
Expand Down Expand Up @@ -204,4 +205,8 @@ echo " alias swoole-cli='swoole-cli -d curl.cainfo=${__PROJECT__}/bin/runtime/ca
echo " OR "
echo " alias swoole-cli='swoole-cli -c ${__PROJECT__}/bin/runtime/php.ini' "
echo " "
test $OS="macos" && echo "sudo xattr -d com.apple.quarantine ${__PROJECT__}/bin/runtime/php"
echo " "
echo " SWOOLE-CLI VERSION ${APP_VERSION}"
export PATH="${__PROJECT__}/bin/runtime:$PATH"
swoole-cli -v

0 comments on commit 55cfd40

Please sign in to comment.