Skip to content

Instantly share code, notes, and snippets.

@bluss
Created June 12, 2025 16:17
Show Gist options
  • Save bluss/c5b432339c4933c1436d2c6d7a65faee to your computer and use it in GitHub Desktop.
Save bluss/c5b432339c4933c1436d2c6d7a65faee to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
SRC="https://github.com/typst/packages"
DEST="${DEST:-typst-packages}"
# space separated list of packages
PACKAGES=(rowmantic)
git clone --no-checkout --filter=blob:none --depth 2 "$SRC" "$DEST"
printf "Created $DEST\n"
cd "$DEST"
git sparse-checkout init
for pkg in "${PACKAGES[@]}"; do
cmd="git sparse-checkout add packages/preview/$pkg"
printf "%s\n" "$cmd" >&2
$cmd
done
printf "INFO: now enter the repository and checkout the main branch\n"
@bluss
Copy link
Author

bluss commented Jun 12, 2025

License: PD and/or MIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment