-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: boltup
installer + script
#422
Conversation
Nice, we'll host this on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, smol nits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wen nix
while [[ -n $1 ]]; do | ||
case $1 in | ||
--) shift; break;; | ||
|
||
-t|--tag) shift; BOLTUP_TAG=$1;; | ||
--arch) shift; BOLTUP_ARCH=$1;; | ||
--platform) shift; BOLTUP_PLATFORM=$1;; | ||
-h|--help) | ||
usage | ||
exit 0 | ||
;; | ||
*) | ||
warn "unknown option: $1" | ||
usage | ||
exit 1 | ||
esac; shift | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be moved to a separate, documented function?
By documentation I mean something like:
"This function loops as long as $1 (the first positional argument) is not empty, and matches its value against flags. If a flag is found, the argument is discarded (via shift
) and the value for the flag is read."
I know, I should RTFM but having gently reminders of bash syntax is nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't move it but I added the comment, as I don't want to introduce untested behaviour in a script that is battle tested (this is what foundry has been using for 2+ years)
Quick installer for the
bolt
CLI tool.Mostly copied from the amazing foundryup 👑.
Note
the install script relies on a binary existing on the unstable branch, so this won't work until this PR is merged.
Try it with:
curl -L https://raw.githubusercontent.com/chainbound/bolt/boltup/boltup/install.sh | bash
I am not responsible if all your files are deleted, etc etc