Skip to content

Commit adc4771

Browse files
committed
Add etc/nix/get-latest-pypi-deps-db.sh.
1 parent f81816f commit adc4771

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

etc/nix/get-latest-pypi-deps-db.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
USER_SLASH_REPO="DavHau/pypi-deps-db"
4+
5+
DATA=$(curl "https://api.github.com/repos/$USER_SLASH_REPO/commits/master" | jq '.sha, .commit.author.date' | sed 's/"//g')
6+
COMMIT=$(sed '1q;d' <<< "$DATA")
7+
DATE=$(sed '2q;d' <<< "$DATA")
8+
SHA256=$(nix-prefetch-url --unpack --type sha256 "https://github.com/$USER_SLASH_REPO/tarball/$COMMIT" | tail -n 1)
9+
10+
echo ""
11+
echo "pypiDataRev = \"$COMMIT\"; # $DATE"
12+
echo "pypiDataSha256 = \"$SHA256\";"

0 commit comments

Comments
 (0)