Skip to content

Commit

Permalink
pkg fetch fetches and extracts the tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Feb 14, 2023
1 parent be36c83 commit a44857f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions bin/pkg-fetch
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ else
fi

for PKG in $PKGS; do
#TODO allow specifying the destination
fetch.ts $PKG
PKG="$(resolve.ts $PKG)"
ZIP="$(query.ts $PKG --src)"
SRCDIR="$(query.ts $PKG --srcdir)"

if test -n "$ZIP"; then
fetch.ts $PKG -o "$ZIP"
fi

if test -f "$ZIP"; then
extract.ts "$ZIP" --pkg $PKG --output-dir "$SRCDIR"
fi

echo "$SRCDIR"
done

0 comments on commit a44857f

Please sign in to comment.