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

feat: boltup installer + script #422

Merged
merged 5 commits into from
Nov 27, 2024
Merged

feat: boltup installer + script #422

merged 5 commits into from
Nov 27, 2024

Conversation

merklefruit
Copy link
Collaborator

@merklefruit merklefruit commented Nov 26, 2024

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

@mempirate
Copy link
Contributor

Nice, we'll host this on https://boltprotocol.xyz/install.sh

Copy link
Contributor

@mempirate mempirate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, smol nits

boltup/boltup.sh Outdated Show resolved Hide resolved
boltup/boltup.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@thedevbirb thedevbirb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wen nix

Comment on lines +17 to +33
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
Copy link
Contributor

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.

Copy link
Collaborator Author

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)

@merklefruit merklefruit marked this pull request as ready for review November 27, 2024 08:03
@merklefruit merklefruit merged commit 147bced into unstable Nov 27, 2024
2 checks passed
@merklefruit merklefruit deleted the boltup branch November 27, 2024 08:36
@mempirate mempirate mentioned this pull request Nov 27, 2024
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.

3 participants