Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Linux support #3

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/tmp/
/composer.lock
/patches.lock.json
/.idea
Tannenfels marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You don't need to have PHP or anything at all on your system to run it.

> [!WARNING]
> **Under heavy development**
> Currently, this is an MVP, and only macOS aarch64 is supported.
> Currently, this is an MVP, and only macOS and linux are supported.

## Installation

Expand Down Expand Up @@ -54,7 +54,7 @@ See some ideas in the todo list below.
- [ ] Bypass cli SAPI name checks
- [ ] static_opcache
- [ ] Support parallel run for Rector
- [ ] Support Linux
- [ ] Support Linux 🚧

## Credits

Expand Down
12 changes: 10 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ mkdir -p ./build
mv index.phar ./build/

cd build || exit
curl -O https://dl.static-php.dev/static-php-cli/common/php-8.3.6-micro-macos-aarch64.tar.gz -C -
tar -xvf php-8.3.4-micro-macos-aarch64.tar.gz

OS=`uname -a|awk '{print $1}'`
arch=`uname -m|awk '{print $1}'`
case $OS in
"Darwin" ) curl -o php "https://dl.static-php.dev/static-php-cli/common/php-8.3.6-micro-macos-${arch}.tar.gz" -C -;;
"Linux" ) curl -o php "https://dl.static-php.dev/static-php-cli/common/php-8.3.6-micro-linux-${arch}.tar.gz" -C -;;
* ) echo "OS is not supported"
exit ;;
esac
tar -xvf php
cat ./micro.sfx ./index.phar > ./phpup && chmod 0755 ./phpup