-
Notifications
You must be signed in to change notification settings - Fork 37
Add install script for macOS and linux #158
Conversation
Do you guys think it's worth making the script POSIX instead of bash? Would make it uglier but work across more platforms. |
install.sh
Outdated
log "finding latest release" | ||
local os=$1 | ||
download https://api.github.com/repos/cdr/sail/releases/latest | | ||
jq -r ".assets[] |
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 don't think it's a good idea to assume jq
is installed.
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.
That's a fair point. It just makes it so nice and easy 😭
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.
Jank shell solution:
curl https://api.github.com/repos/cdr/sail/releases/latest | grep "browser_download_url" | grep "linux" | awk -F": " '{print $2}'
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.
yeah definitely can't use jq...
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.
This script should be in site/static/install.sh
so it's served from sail.dev/install.sh
install.sh
Outdated
log "finding latest release" | ||
local os=$1 | ||
download https://api.github.com/repos/cdr/sail/releases/latest | | ||
jq -r ".assets[] |
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.
yeah definitely can't use jq...
Also should amend docs |
@nhooyr isn't bash universal these days? |
Yea pretty much, I guess its nbd, lets see if anyone wants a POSIX compliant script after release. |
Closes #150