Skip to content

Commit e73099e

Browse files
committed
Document ultra portable scripting
1 parent b7b045a commit e73099e

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ used to build a whole ecosystem of tools.
196196

197197
## `dev`
198198

199-
`dev` uses `pkgx` and shellcode to create “virtual environments” consisting of
200-
the specific versions of tools and their dependencies you need for your
201-
projects.
199+
`dev` uses `pkgx` and `pkgm` (or shellcode) to create “virtual environments”
200+
consisting of the specific versions of tools and their dependencies you need
201+
for your projects.
202202

203203
```sh
204204
$ cd my-rust-proj && ls

docs/scripting.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,19 @@ show it off.
111111

112112
We make use of `pkgx` scripting all over our repositories. Check them out!
113113

114+
## Ultra Portable Scripts
115+
116+
Requiring a `pkgx` shebang is somewhat limiting. Instead you can use our `cURL`
117+
one-liner coupled with `+pkg` syntax to temporarily install pkgs and utilize
118+
them in your scripts:
119+
120+
```sh
121+
#!/bin/bash
122+
123+
eval "$(sh <(curl https://pkgx.sh) +git)"
124+
125+
which git # prints soemthing like /tmp/pkgx/git-scm.org/v2.46.3/bin/git
126+
```
127+
114128
[shebang]: https://en.wikipedia.org/wiki/Shebang_(Unix)
115129
[Scriptisto]: https://github.com/igor-petruk/scriptisto

0 commit comments

Comments
 (0)