Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Add install script for macOS and linux#158

Merged
nhooyr merged 5 commits intomasterfrom
installsh
May 22, 2019
Merged

Add install script for macOS and linux#158
nhooyr merged 5 commits intomasterfrom
installsh

Conversation

@nhooyr
Copy link
Copy Markdown
Contributor

@nhooyr nhooyr commented May 22, 2019

  • Update docs

Closes #150

@nhooyr nhooyr requested a review from ammario May 22, 2019 17:14
@nhooyr
Copy link
Copy Markdown
Contributor Author

nhooyr commented May 22, 2019

Do you guys think it's worth making the script POSIX instead of bash? Would make it uglier but work across more platforms.

Comment thread install.sh Outdated
log "finding latest release"
local os=$1
download https://api.github.com/repos/cdr/sail/releases/latest |
jq -r ".assets[]
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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 😭

Copy link
Copy Markdown
Contributor

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}'

Copy link
Copy Markdown
Member

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...

Copy link
Copy Markdown
Member

@ammario ammario left a 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

Comment thread install.sh Outdated
log "finding latest release"
local os=$1
download https://api.github.com/repos/cdr/sail/releases/latest |
jq -r ".assets[]
Copy link
Copy Markdown
Member

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...

@ammario
Copy link
Copy Markdown
Member

ammario commented May 22, 2019

Also should amend docs

@ammario
Copy link
Copy Markdown
Member

ammario commented May 22, 2019

@nhooyr isn't bash universal these days?

@nhooyr
Copy link
Copy Markdown
Contributor Author

nhooyr commented May 22, 2019

Yea pretty much, I guess its nbd, lets see if anyone wants a POSIX compliant script after release.

@nhooyr nhooyr requested review from ammario and scsmithr May 22, 2019 19:00
@nhooyr nhooyr mentioned this pull request May 22, 2019
@nhooyr nhooyr merged commit 32a0139 into master May 22, 2019
@nhooyr nhooyr deleted the installsh branch May 22, 2019 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install script for linux/darwin

3 participants