Created
June 12, 2025 16:17
-
-
Save bluss/c5b432339c4933c1436d2c6d7a65faee to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
License: PD and/or MIT