Commit 20a6b24
committed
feat(update): Add self-update functionality to phpv
Implement a self-update mechanism for phpv that allows users to
easily update the script to the latest version from the GitHub
repository. The update process includes:
- Downloading the latest script from GitHub
- Validating the downloaded script
- Replacing the current script with the updated version
- Preserving script permissions
- Providing user feedback during the update process
Adds new command-line options `-u` and `--self-update` to trigger
the update process.1 parent 19b8868 commit 20a6b24
2 files changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
140 | 148 | | |
141 | 149 | | |
142 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
116 | 143 | | |
117 | 144 | | |
118 | 145 | | |
| |||
301 | 328 | | |
302 | 329 | | |
303 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
304 | 335 | | |
305 | 336 | | |
306 | 337 | | |
| |||
325 | 356 | | |
326 | 357 | | |
327 | 358 | | |
| 359 | + | |
328 | 360 | | |
329 | 361 | | |
330 | 362 | | |
| |||
339 | 371 | | |
340 | 372 | | |
341 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
342 | 377 | | |
343 | 378 | | |
344 | 379 | | |
| |||
0 commit comments