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

More robust recommended method to install #18

Open
springmeyer opened this issue Dec 7, 2016 · 3 comments
Open

More robust recommended method to install #18

springmeyer opened this issue Dec 7, 2016 · 3 comments

Comments

@springmeyer
Copy link
Contributor

springmeyer commented Dec 7, 2016

There is a no standard package manager for bash scripts. So we've given the recommendation for a one-liner that uses curl and tar in the readme: https://github.com/mapbox/logbt#install.

This issue is to summarize problems with the current approach and discuss improvements.

Current problems:

  • tar on linux does not support --include (only bsdtar on osx supports --include). Ideally the install would recommend --include=bin* such that only ./bin/logbt would be installed into /usr/local/bin/logbt
  • So, we recommend --exclude, but this is fragile because new files added to the repo, like .travis.yml or circle.yml will start getting installed into /usr/local/.travis.yml.
  • /usr/local/.travis.yml may easily conflict with other installs using this kind of mechanism
  • Permissions problems can lead to odd tar errors: Can't unlink already-existing object will happen if the install tries to write over an existing file that is write protected in a directory that it does have permissions to write to.
@springmeyer
Copy link
Contributor Author

Alternative approach, which works for repos like logbt that contain a single bash script:

curl \
 -sSfL \
 https://raw.githubusercontent.com/mapbox/logbt/v1.6.0/bin/logbt \
 -o /usr/local/bin/logbt && \
 chmod +x /usr/local/bin/logbt

@rclark
Copy link

rclark commented Dec 7, 2016

Usually we've pushed single files from single-script repos like this onto S3 and suggested users curl from there. https://github.com/mapbox/install-node is the primary example. Any reason that doesn't work here?

@springmeyer
Copy link
Contributor Author

Usually we've pushed single files from single-script repos like this onto S3 and suggested users curl from there. https://github.com/mapbox/install-node is the primary example. Any reason that doesn't work here?

Thanks, that works. Sounds like that is the essentially same as this idea above with the minor difference being that the single install-node file is pulled from s3 instead of github and https://github.com/mapbox/install-node#run-from-s3 recommends running from s3 rather than downloading and chmod'ing first. In the logbt case I think the download should always happen separately from the usage, hence why I download and chmod.

@springmeyer springmeyer changed the title More robust recommend method to install More robust recommended method to install Apr 11, 2019
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

No branches or pull requests

2 participants