Skip to content

Commit ff0430d

Browse files
committed
Refactor install.sh to update installation process and fix version fetching
1 parent 8e125a8 commit ff0430d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.MD

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,18 @@ PHP 8.1.1
7070
To **install** or **update** phpvm, run the following command using either `curl` or `wget`:
7171

7272
```sh
73-
curl -o- https://raw.githubusercontent.com/Thavarshan/phpvm/0.0.1/bin/install.sh | bash
73+
curl -o- https://raw.githubusercontent.com/Thavarshan/phpvm/main/bin/install.sh | bash
7474
```
7575

7676
```sh
77-
wget -qO- https://raw.githubusercontent.com/Thavarshan/phpvm/0.0.1/bin/install | bash
77+
wget -qO- https://raw.githubusercontent.com/Thavarshan/phpvm/main/bin/install | bash
7878
```
7979

8080
This script clones the `phpvm` repository into `~/.phpvm` and attempts to add the following lines to your profile (`~/.bashrc`, `~/.zshrc`, or `~/.profile`):
8181

8282
```sh
8383
export PHPVM_DIR="$HOME/.phpvm"
84-
[ -s "$PHPVM_DIR/index.js" ] && \. "$PHPVM_DIR/index.js" # This loads phpvm
84+
[[ -s "$PHPVM_DIR/index.js" ]] && export PATH="$PHPVM_DIR/bin:$PATH" && node "$PHPVM_DIR/index.js"
8585
```
8686

8787
### Verify Installation
@@ -106,7 +106,7 @@ Then add the following lines to your shell's profile (`~/.bashrc`, `~/.zshrc`, e
106106

107107
```sh
108108
export PHPVM_DIR="$HOME/.phpvm"
109-
[ -s "$PHPVM_DIR/index.js" ] && \. "$PHPVM_DIR/index.js" # This loads phpvm
109+
[[ -s "$PHPVM_DIR/index.js" ]] && export PATH="$PHPVM_DIR/bin:$PATH" && node "$PHPVM_DIR/index.js"
110110
```
111111

112112
### Manual Update
@@ -233,7 +233,7 @@ And remove the following lines from your shell's profile:
233233

234234
```sh
235235
export PHPVM_DIR="$HOME/.phpvm"
236-
[ -s "$PHPVM_DIR/index.js" ] && \. "$PHPVM_DIR/index.js" # This loads phpvm
236+
[[ -s "$PHPVM_DIR/index.js" ]] && export PATH="$PHPVM_DIR/bin:$PATH" && node "$PHPVM_DIR/index.js"
237237
```
238238

239239
## Troubleshooting

0 commit comments

Comments
 (0)