From d1ca27d4fd45471b5c76d565b2e9f867ee2868d4 Mon Sep 17 00:00:00 2001 From: drmikecrowe Date: Sun, 24 Jan 2021 06:24:45 -0500 Subject: [PATCH 1/5] Adding .tgz extension --- handler/handler_github.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/handler_github.go b/handler/handler_github.go index 5afb490..d022eff 100644 --- a/handler/handler_github.go +++ b/handler/handler_github.go @@ -103,7 +103,7 @@ func (h *Handler) getAssetsNoCache(q *query) error { //only binary containers are supported //TODO deb,rpm etc fext := getFileExt(url) - if fext != ".zip" && fext != ".gz" && fext != ".tar.gz" { + if fext != ".zip" && fext != ".gz" && fext != ".tar.gz" && fext != ".tgz" { continue } //match From fbd35169dd2c66e3a7823338146ea108b518ada6 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 24 Jan 2021 12:29:01 -0500 Subject: [PATCH 2/5] Adding `.local/bin` installaction and additional documentation --- README.md | 84 +++++++++++++++++++++++++--------------------- scripts/install.sh | 2 +- scripts/statik.go | 4 +-- 3 files changed, 49 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 2c826e9..c79eccc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - # `installer` Quickly install pre-compiled binaries from Github releases. @@ -17,22 +16,22 @@ curl https://i.jpillora.com//@! | bash curl https://i.jpillora.com/! | bash ``` -*Or you can use* `wget -qO- | bash` +_Or you can use_ `wget -qO- | bash` **Path API** -* `user` Github user (defaults to @jpillora, customisable if you [host your own](#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/` +- `user` Github user (defaults to @jpillora, customisable if you [host your own](#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](#homebrew) -* `?insecure=1` Force `curl`/`wget` to skip certificate checks +- `?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](#homebrew) +- `?insecure=1` Force `curl`/`wget` to skip certificate checks ## Security @@ -40,43 +39,52 @@ curl https://i.jpillora.com/! | bash ## Examples -* https://i.jpillora.com/serve -* https://i.jpillora.com/cloud-torrent -* https://i.jpillora.com/yudai/gotty@v0.0.12 -* https://i.jpillora.com/mholt/caddy -* https://i.jpillora.com/caddy -* https://i.jpillora.com/rclone - - ```sh - $ curl -s i.jpillora.com/mholt/caddy! | bash - Downloading mholt/caddy v0.8.2 (https://github.com/mholt/caddy/releases/download/v0.8.2/caddy_darwin_amd64.zip) - ######################################################################## 100.0% - Downloaded to /usr/local/bin/caddy - $ caddy --version - Caddy 0.8.2 - ``` +- https://i.jpillora.com/serve +- https://i.jpillora.com/cloud-torrent +- https://i.jpillora.com/yudai/gotty@v0.0.12 +- https://i.jpillora.com/mholt/caddy +- https://i.jpillora.com/caddy +- https://i.jpillora.com/rclone + + ```sh + $ curl -s i.jpillora.com/mholt/caddy! | bash + Downloading mholt/caddy v0.8.2 (https://github.com/mholt/caddy/releases/download/v0.8.2/caddy_darwin_amd64.zip) + ######################################################################## 100.0% + Downloaded to /usr/local/bin/caddy + $ caddy --version + Caddy 0.8.2 + ``` ## Host your own -* Install installer with installer +- Install installer with installer + + ```sh + curl -s https://i.jpillora.com/installer | bash + ``` + +- Install from source + + ```sh + go get github.com/jpillora/installer + ``` - ```sh - curl -s https://i.jpillora.com/installer | bash - ``` +- Install on Heroku -* Install from source + Click this button to deploy for free on [Heroku](https://heroku.com) - ```sh - go get github.com/jpillora/installer - ``` + [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) -* Install on Heroku + _You can optionally add your own domain as a app custom domain._ - Click this button to deploy for free on [Heroku](https://heroku.com) +### Modifying the Installation Script for Host Your Own - [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) +To modify the installation script for a host-your-own installation, you will need to do the following: - *You can optionally add your own domain as a app custom domain.* +1. Change line 11 of `handler/init.go` to reflect your github username (`_ "github.com/[YOUR-GITHUB-NAME-HERE]/installer/scripts"`) +1. Similarly, import your handler in `main.go` on line 8 (`"github.com/[YOUR-GITHUB-NAME-HERE]/installer/handler"`) +1. Change `go.mod` to your module name as well (`module github.com/[YOUR-GITHUB-NAME-HERE]/installer`) +1. Deploy to heroku ### Homebrew diff --git a/scripts/install.sh b/scripts/install.sh index 1e040a8..582b384 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -17,7 +17,7 @@ function install { MOVE="{{ .MoveToPath }}" RELEASE="{{ .Release }}" INSECURE="{{ .Insecure }}" - OUT_DIR="{{ if .MoveToPath }}/usr/local/bin{{ else }}$(pwd){{ end }}" + OUT_DIR="{{ if and .SudoMove .MoveToPath }}/usr/local/bin{{ else if .MoveToPath }}$HOME/.local/bin{{ else }}$(pwd){{ end }}" GH="https://github.com" #bash check [ ! "$BASH_VERSION" ] && fail "Please use bash instead" diff --git a/scripts/statik.go b/scripts/statik.go index ccf0326..8fdc476 100644 --- a/scripts/statik.go +++ b/scripts/statik.go @@ -8,7 +8,7 @@ import ( func init() { - data := "PK\x03\x04\x14\x00\x08\x00\x08\x00@\x94iQ\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00 \x00install.shUT\x05\x00\x01\x98\x8b\xa9_\x9cW\x7fO#9\x12\xfd\xdb\xfe\x14E\xa75\"w\xdb\x89\x98\x99\xe5V\xa0\x8c\xc4,Y@\x02\x12%auw\xa3\x11k\xda\xee\x8e5\xddv\x8f\xed\x0e0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x81)+\x1b\xe4-Z\xc8\xfbL$$\xdf\xbf\xbf\x04x\xebf\xb7*_\xeein\xdeo\xbc\xea\xb3\xd7l\xe7\xbas\x01\xbe\xdd\x91\xd473\xdb\"\xed\x19/\x18\x98\xc7\x8a\x1d\x05\x1a\x8d\xb4kf\xfb t}g\x14cP\x10\x953m\xfc\xfe\xfd;.\xba\x18\xd9\x13\xfd\xf9\xe2z\x10\xef\xbb\xc9\xd7\x83\xc4:\x82\x0c\x9e\xc2E\x8f\xd6\xf0\xe4/o\x89p\xf5\xb7\xb7\x0f+AO\xee\xa2\x95d\xf0\xbe\xeb\xf5\xc0\xdef3\x88\xe2\xe02\x82M\x1aB\xf2d]\xf8[\xa5\x8b\xe5\xfe\xf9c\x0e\xfb\xdb\xdc\xd6\xa3\x89 m\xaf\xf4\xdch\xcf]\x81\x99\x13\x01\x07W\x9f\xd7\n\xb4Ok;\x1d\x9b\xa0kV\x07]H\n\x03\x07\xdb\xc5\x087\x13\xd9\x04\xcdd-(\xec\xaf\xb1\xa1\xd9vB\xad\xd9\x94rao0F\xc2\xf8dv\x0eRAzO1J\xe7\xa5\xa4\xf0\xcf\x87-\x0e\xebniL\xeb\xfa\x85\xc90\xad\xa9\xb4\x13\x07V+/\xc9~,\xe8\x9aJ; \\$O\xd2*\xf5\x96N\xbf\xc4;\xcczG\xb9\xd8\xd0h~)\xf4w\xe4\xab\\4|\xa0\xf3\xc7\xc5\xf5\xc9%Lg\xc3\xf1^3\x1d\xde\x18\x88\x8c\x021/G\"\xa3`\xe4\xd6P|\x16\xd7\xfdNq\x83\xa8\xf9\xd9\xb9\xc2\xe18\xe3\xff\x05\x00\x00\xff\xffPK\x07\x08B\xcdYJ\x06\x06\x00\x00\xfa\x0e\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00@\x94iQB\xcdYJ\x06\x06\x00\x00\xfa\x0e\x00\x00\n\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x00install.shUT\x05\x00\x01\x98\x8b\xa9_PK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00A\x00\x00\x00G\x06\x00\x00\x00\x00" + data := "PK\x03\x04\x14\x00\x08\x00\x08\x00m\x848R\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00 \x00install.shUT\x05\x00\x01\xce\xa1\x0d`\x9cWmo\xdb8\x12\xfeL\xfe\x8a\x89,\x14\xc9\xdd\xcaB\xdann\x91\xc0\x05\xd2\x8d7 \x90\xc4\x86\xed,\xee\xae(\xb2\x8cHID%R%\xa9\xbc\xd4\xf1\x7f?\xf0E\xb6\xe38\xc1u\x0d$\x908\xf3\xcc<\x9c\x19\xceP\xbd\x9d\xf4\x96\x8b\xf4\x96\xe8\x12\xcf.\xc77'\xe7\x93A\x94\x9a\xba\xb1\x7f\\hC\xaa\x8ar\x15\xe1\xbc\x15\x99\xe1R@V1\"\xda\x06\xe6\x18\xb1\xac\x94\xa0jHT\x0eq@\xc3'H)\xbbKE[Ux\xb1\x82\xe5\x84W\x16\x13\xe0\x18\xd5\xba\x18\xc4\xfb\xc1H4X\xfbE\xdd\xe2P)\xa9\x0e!\xaeu\x11\xc1\xfe\xa7w\xef1b\x0f\xdc\xc0\xfe\xba\xe1@\xd2\xda\xeeif\x0c\x17\x85\xc6\xe8z:\x9c\x0c\xa2\xf9\x1c\xfa\xd7\x9a)X,\"\x8c\xc6\x93\xd1\xa9_\x1b+Y(R\xfb\xe5\xcb\xd1\x9fC\xbf|)\xef\xd8L\x8e\x89)\xbdd2\xbc\x18\x1eO\x83p\xc2*F4\xf3\x92\xf3\xab\xe9\xf0\xf7\xebI\x10\x9d\x0b\xcd\xb2V\x05\xd9\xe8z\xe6\xc38\x9f\x03\xcf\x81\x08\n\xfdiK\xa5\xb5\xbe\xe1#m\xb5J+\x99\x91\xcafa>\x07VifA\xcf\xd5\xe2\xb3\xd1\xe50\xed\xbfP\\,\xe2\xdd\xe6\x9e\xee\xd9wA\xbd\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PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00m\x848R}<\xb2\xe3\x1c\x06\x00\x001\x0f\x00\x00\n\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x00\x00\x00\x00install.shUT\x05\x00\x01\xce\xa1\x0d`PK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00A\x00\x00\x00]\x06\x00\x00\x00\x00" fs.Register(data) } - \ No newline at end of file + From dd530a063edf01bb5131f1d460ffa848e6d64656 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 24 Jan 2021 12:34:19 -0500 Subject: [PATCH 3/5] Updating README.md --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index c79eccc..d50cef9 100644 --- a/README.md +++ b/README.md @@ -16,22 +16,22 @@ curl https://i.jpillora.com//@! | bash curl https://i.jpillora.com/! | bash ``` -_Or you can use_ `wget -qO- | bash` +*Or you can use* `wget -qO- | bash` **Path API** -- `user` Github user (defaults to @jpillora, customisable if you [host your own](#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/` +* `user` Github user (defaults to @jpillora, customisable if you [host your own](#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](#homebrew) -- `?insecure=1` Force `curl`/`wget` to skip certificate checks +* `?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](#homebrew) +* `?insecure=1` Force `curl`/`wget` to skip certificate checks ## Security @@ -39,12 +39,12 @@ _Or you can use_ `wget -qO- | bash` ## Examples -- https://i.jpillora.com/serve -- https://i.jpillora.com/cloud-torrent -- https://i.jpillora.com/yudai/gotty@v0.0.12 -- https://i.jpillora.com/mholt/caddy -- https://i.jpillora.com/caddy -- https://i.jpillora.com/rclone +* https://i.jpillora.com/serve +* https://i.jpillora.com/cloud-torrent +* https://i.jpillora.com/yudai/gotty@v0.0.12 +* https://i.jpillora.com/mholt/caddy +* https://i.jpillora.com/caddy +* https://i.jpillora.com/rclone ```sh $ curl -s i.jpillora.com/mholt/caddy! | bash @@ -57,25 +57,25 @@ _Or you can use_ `wget -qO- | bash` ## Host your own -- Install installer with installer +* Install installer with installer ```sh curl -s https://i.jpillora.com/installer | bash ``` -- Install from source +* Install from source ```sh go get github.com/jpillora/installer ``` -- Install on Heroku +* Install on Heroku Click this button to deploy for free on [Heroku](https://heroku.com) [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) - _You can optionally add your own domain as a app custom domain._ + *You can optionally add your own domain as a app custom domain.* ### Modifying the Installation Script for Host Your Own From 3501b93eae695af102132e17789f62473356d2bb Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 24 Jan 2021 12:38:28 -0500 Subject: [PATCH 4/5] Updating README.md --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d50cef9..c79eccc 100644 --- a/README.md +++ b/README.md @@ -16,22 +16,22 @@ curl https://i.jpillora.com//@! | bash curl https://i.jpillora.com/! | bash ``` -*Or you can use* `wget -qO- | bash` +_Or you can use_ `wget -qO- | bash` **Path API** -* `user` Github user (defaults to @jpillora, customisable if you [host your own](#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/` +- `user` Github user (defaults to @jpillora, customisable if you [host your own](#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](#homebrew) -* `?insecure=1` Force `curl`/`wget` to skip certificate checks +- `?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](#homebrew) +- `?insecure=1` Force `curl`/`wget` to skip certificate checks ## Security @@ -39,12 +39,12 @@ curl https://i.jpillora.com/! | bash ## Examples -* https://i.jpillora.com/serve -* https://i.jpillora.com/cloud-torrent -* https://i.jpillora.com/yudai/gotty@v0.0.12 -* https://i.jpillora.com/mholt/caddy -* https://i.jpillora.com/caddy -* https://i.jpillora.com/rclone +- https://i.jpillora.com/serve +- https://i.jpillora.com/cloud-torrent +- https://i.jpillora.com/yudai/gotty@v0.0.12 +- https://i.jpillora.com/mholt/caddy +- https://i.jpillora.com/caddy +- https://i.jpillora.com/rclone ```sh $ curl -s i.jpillora.com/mholt/caddy! | bash @@ -57,25 +57,25 @@ curl https://i.jpillora.com/! | bash ## Host your own -* Install installer with installer +- Install installer with installer ```sh curl -s https://i.jpillora.com/installer | bash ``` -* Install from source +- Install from source ```sh go get github.com/jpillora/installer ``` -* Install on Heroku +- Install on Heroku Click this button to deploy for free on [Heroku](https://heroku.com) [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) - *You can optionally add your own domain as a app custom domain.* + _You can optionally add your own domain as a app custom domain._ ### Modifying the Installation Script for Host Your Own From 755d85cf4f0bed1e02911368a204642ca59be9a7 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 24 Jan 2021 12:41:03 -0500 Subject: [PATCH 5/5] Updating README.md --- README.md | 75 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index c79eccc..b943da1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + # `installer` Quickly install pre-compiled binaries from Github releases. @@ -16,22 +17,22 @@ curl https://i.jpillora.com//@! | bash curl https://i.jpillora.com/! | bash ``` -_Or you can use_ `wget -qO- | bash` +*Or you can use* `wget -qO- | bash` **Path API** -- `user` Github user (defaults to @jpillora, customisable if you [host your own](#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/` +* `user` Github user (defaults to @jpillora, customisable if you [host your own](#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](#homebrew) -- `?insecure=1` Force `curl`/`wget` to skip certificate checks +* `?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](#homebrew) +* `?insecure=1` Force `curl`/`wget` to skip certificate checks ## Security @@ -39,43 +40,43 @@ _Or you can use_ `wget -qO- | bash` ## Examples -- https://i.jpillora.com/serve -- https://i.jpillora.com/cloud-torrent -- https://i.jpillora.com/yudai/gotty@v0.0.12 -- https://i.jpillora.com/mholt/caddy -- https://i.jpillora.com/caddy -- https://i.jpillora.com/rclone - - ```sh - $ curl -s i.jpillora.com/mholt/caddy! | bash - Downloading mholt/caddy v0.8.2 (https://github.com/mholt/caddy/releases/download/v0.8.2/caddy_darwin_amd64.zip) - ######################################################################## 100.0% - Downloaded to /usr/local/bin/caddy - $ caddy --version - Caddy 0.8.2 - ``` +* https://i.jpillora.com/serve +* https://i.jpillora.com/cloud-torrent +* https://i.jpillora.com/yudai/gotty@v0.0.12 +* https://i.jpillora.com/mholt/caddy +* https://i.jpillora.com/caddy +* https://i.jpillora.com/rclone + + ```sh + $ curl -s i.jpillora.com/mholt/caddy! | bash + Downloading mholt/caddy v0.8.2 (https://github.com/mholt/caddy/releases/download/v0.8.2/caddy_darwin_amd64.zip) + ######################################################################## 100.0% + Downloaded to /usr/local/bin/caddy + $ caddy --version + Caddy 0.8.2 + ``` ## Host your own -- Install installer with installer +* Install installer with installer - ```sh - curl -s https://i.jpillora.com/installer | bash - ``` + ```sh + curl -s https://i.jpillora.com/installer | bash + ``` -- Install from source +* Install from source - ```sh - go get github.com/jpillora/installer - ``` + ```sh + go get github.com/jpillora/installer + ``` -- Install on Heroku +* Install on Heroku - Click this button to deploy for free on [Heroku](https://heroku.com) + Click this button to deploy for free on [Heroku](https://heroku.com) - [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) + [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) - _You can optionally add your own domain as a app custom domain._ + *You can optionally add your own domain as a app custom domain.* ### Modifying the Installation Script for Host Your Own