Skip to content

Commit 598809c

Browse files
Merge pull request #4 from Enselic/python3-not-jq
Remove dependency on `jq`, use plain `python3` instead
2 parents c3efbeb + 4d560f8 commit 598809c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

update.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/bin/sh
22

3+
pyjq() {
4+
python3 -c "import json, sys; print(json.load(sys.stdin)${1})"
5+
}
6+
37
curl -# https://raw.githubusercontent.com/rust-lang/rust/master/src/rustdoc-json-types/lib.rs | sed 's/rustc_data_structures::fx::/std::collections::/g' | sed 's/FxHashMap/HashMap/g' > src/lib.rs
48

59
curl -# https://raw.githubusercontent.com/rust-lang/rust/master/src/rustdoc-json-types/tests.rs > src/tests.rs
610

7-
curl -# "https://api.github.com/repos/rust-lang/rust/commits?path=src/rustdoc-json-types/lib.rs" | jq -r ".[0].sha" > COMMIT.txt
11+
curl -# "https://api.github.com/repos/rust-lang/rust/commits?path=src/rustdoc-json-types/lib.rs" | pyjq '[0]["sha"]' > COMMIT.txt

0 commit comments

Comments
 (0)