Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update.sh: Make user, repo, and branch easy to change #14

Merged
merged 1 commit into from Aug 20, 2022

Conversation

Enselic
Copy link
Contributor

@Enselic Enselic commented Jul 28, 2022

This makes it easy for me to try out e.g. rust-lang/rust#99787 by temporarily doing the following change in the script and then run it:

index 5437494..ba0d8c6 100755
--- a/update.sh
+++ b/update.sh
@@ -4,9 +4,9 @@ pyjq() {
     python3 -c "import json, sys; print(json.load(sys.stdin)${1})"
 }
 
-user="rust-lang"
+user="aDotInTheVoid"
 repo="rust"
-branch="master"
+branch="rdj-dyn"
 
 curl -# https://raw.githubusercontent.com/${user}/${repo}/${branch}/src/rustdoc-json-types/lib.rs | sed 's/rustc_data_structures::fx::/std::collections::/g' | sed 's/FxHashMap/HashMap/g' > src/lib.rs

IMHO it would be overkill (and more complicated to use) if we made these changeable by script args ($2 $3 $4) instead, so I prefer this.

@Enselic
Copy link
Contributor Author

Enselic commented Aug 19, 2022

@aDotInTheVoid Any chance you could take a look at this please? I used it again for rust-lang/rust#100762 and find it very useful.

The diff might look compilicated, but it's very simple actually. I just extract hardcoded strings into variables.

Let me know if you have any concerns and we'll sort them out somehow!

@aDotInTheVoid aDotInTheVoid merged commit 13a042d into aDotInTheVoid:trunk Aug 20, 2022
@aDotInTheVoid
Copy link
Owner

No concerns, just hadn't gotten around to looking over it, and it seemed non-urgent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants