Code Monkey home page Code Monkey logo

installer's Introduction

installer

Quickly install pre-compiled binaries from Github releases.

Installer is an HTTP server which returns shell scripts. The returned script will detect platform OS and architecture, choose from a selection of URLs, download the appropriate file, un(zip|tar|gzip) the file, find the binary (largest file) and optionally move it into your PATH. Useful for installing your favourite pre-compiled programs on hosts using only curl.

Usage

# install <user>/<repo> from github
curl https://i.jpillora.com/<user>/<repo>@<release>! | bash
# search Google for github repo <query>
curl https://i.jpillora.com/<query>! | bash

Or you can use wget -qO- <url> | bash

Path API

  • user Github user (defaults to @jpillora, customisable if you host your own, uses Google to pick most relevant user when repo not found)
  • repo Github repository belonging to user (required)
  • release Github release name (defaults to the latest release)
  • ! When provided, downloads binary directly into /usr/local/bin/ (defaults to working directory)
  • !! Uses sudo to mv into /usr/local/bin/

Query Params

  • ?type= Force the return type to be one of: script or homebrew
    • type is normally detected via User-Agent header
    • type=homebrew is not working at the moment – see Homebrew
  • ?insecure=1 Force curl/wget to skip certificate checks

Security

⚠️ Although I promise my instance of installer is simply a copy of this repo - you're right to be wary of piping shell scripts from unknown servers, so you can host your own server here or just leave off | bash and checkout the script yourself.

Examples

Host your own

  • Install installer with installer

    curl -s https://i.jpillora.com/installer | bash
  • Install from source

    go get github.com/jpillora/installer
  • Install on Heroku

    Click this button to deploy for free on Heroku

    Deploy

    You can optionally add your own domain as a app custom domain.

Homebrew

Currently, installing via Homebrew does not work. Homebrew was intended to be supported with:

#does not work
brew install https://i.jpillora.com/serve

However, homebrew formulas require an SHA1 hash of each binary and currently, the only way to get is to actually download the file. It might be acceptable to download all assets if the resulting .rb file was cached for a long time.

MIT License

Copyright © 2020 Jaime Pillora <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

installer's People

Contributors

jpillora avatar helder-moreira avatar albttx avatar fly33499 avatar laverya avatar temoto avatar drmikecrowe avatar milahu avatar

Forkers

renovate-bot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.