forked from pkgxdev/pkgx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env -S tea -E | ||
|
||
_=" | ||
--- | ||
args: /bin/sh | ||
--- | ||
" | ||
|
||
ROOTS=$(ls /opt/tea.xyz/var/pantry/projects) | ||
|
||
for x in $ROOTS | ||
do | ||
if [ "X$x" = "X" ] | ||
then | ||
continue | ||
fi | ||
rm -rf /opt/"$x" | ||
done | ||
|
||
rm /opt/tea.xyz/var/www/*.tar.?z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env -S tea -E | ||
|
||
// returns all pantry entries as `[{ name, path }]` | ||
|
||
/*--- | ||
args: | ||
- deno | ||
- run | ||
- --allow-env | ||
- --allow-read | ||
- --allow-write | ||
- --import-map={{ srcroot }}/import-map.json | ||
- --allow-net | ||
- --allow-run | ||
---*/ | ||
|
||
import { lvl1 as link } from "prefab/link.ts" | ||
import install from "prefab/install.ts" | ||
import { parsePackageRequirement } from "types" | ||
import resolve from "prefab/resolve.ts" | ||
import useFlags from "hooks/useFlags.ts" | ||
|
||
useFlags() | ||
|
||
const pkgs = Deno.args.map(project => { | ||
const match = project.match(/projects\/(.+)\/package.yml/) | ||
return match ? match[1] : project | ||
}).map(parsePackageRequirement) | ||
|
||
// resolve and install precise versions that are available in available inventories | ||
for await (const pkg of await resolve(pkgs)) { | ||
console.log({ installing: pkg.project }) | ||
const installation = install(pkg) | ||
await link(installation) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters