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

Current install instructions seem to be broken. #22

Open
LaurentDumont opened this issue Sep 14, 2020 · 3 comments
Open

Current install instructions seem to be broken. #22

LaurentDumont opened this issue Sep 14, 2020 · 3 comments

Comments

@LaurentDumont
Copy link

Hi!

This seemed like a nice project and I was looking to trying it. That said, it looks like the install instructions might be outaded.

Looking at https://raw.githubusercontent.com/liamg/shox/master/scripts/install.sh

#!/bin/bash

set -e

echo "Determining platform..."
platform=$(uname | tr '[:upper:]' '[:lower:]')
echo "Finding latest release..."
asset=$(curl --silent https://api.github.com/repos/liamg/shox/releases/latest | grep -o "https://github.com/liamg/shox/releases/download/.*/shox-$platform-amd64" | head -n1)
echo "Downloading latest release for your platform..."
curl -s -L -H "Accept: application/octet-stream" "${asset}" --output ./shox
echo "Installing shox..."
chmod +x ./shox
installdir="${HOME}/bin/"
if [ "$EUID" -eq 0 ]; then
  installdir="/usr/local/bin/"
fi
mkdir -p $installdir
mv ./shox "${installdir}/shox"
which shox &> /dev/null || (echo "Please add ${installdir} to your PATH to complete installation!" && exit 1)
echo "Installation complete!"

This https://api.github.com/repos/liamg/shox/releases/latest seems to return

{
  "url": "https://api.github.com/repos/liamg/shox/releases/29853635",
  "assets_url": "https://api.github.com/repos/liamg/shox/releases/29853635/assets",
  "upload_url": "https://uploads.github.com/repos/liamg/shox/releases/29853635/assets{?name,label}",
  "html_url": "https://github.com/liamg/shox/releases/tag/v0.0.18",
  "id": 29853635,
  "node_id": "MDc6UmVsZWFzZTI5ODUzNjM1",
  "tag_name": "v0.0.18",
  "target_commitish": "master",
  "name": "v0.0.18",
  "draft": false,
  "author": {
    "login": "liamg",
    "id": 1187060,
    "node_id": "MDQ6VXNlcjExODcwNjA=",
    "avatar_url": "https://avatars1.githubusercontent.com/u/1187060?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/liamg",
    "html_url": "https://github.com/liamg",
    "followers_url": "https://api.github.com/users/liamg/followers",
    "following_url": "https://api.github.com/users/liamg/following{/other_user}",
    "gists_url": "https://api.github.com/users/liamg/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/liamg/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/liamg/subscriptions",
    "organizations_url": "https://api.github.com/users/liamg/orgs",
    "repos_url": "https://api.github.com/users/liamg/repos",
    "events_url": "https://api.github.com/users/liamg/events{/privacy}",
    "received_events_url": "https://api.github.com/users/liamg/received_events",
    "type": "User",
    "site_admin": false
  },
  "prerelease": false,
  "created_at": "2020-08-19T09:03:07Z",
  "published_at": "2020-08-19T09:03:39Z",
  "assets": [

  ],
  "tarball_url": "https://api.github.com/repos/liamg/shox/tarball/v0.0.18",
  "zipball_url": "https://api.github.com/repos/liamg/shox/zipball/v0.0.18",
  "body": "- Fix rendering on OSX and IntelliJ"
}

And this grep -o "https://github.com/liamg/shox/releases/download/.*/shox-$platform-amd64" | head -n1 wont match anything 😢

@Siegecmd
Copy link

Any update on this?

@erichs
Copy link

erichs commented Feb 22, 2021

I note that the last release which contained built platform binaries was https://github.com/liamg/shox/releases/tag/v0.0.12.

v0.0.13 and later do not have downloadable binaries.

@imlinus
Copy link

imlinus commented Sep 27, 2022

Okay, I got it up and running by copying the steps from the script and using v0.0.12 that erichs suggested

Here is what I did

curl -s -L -H "Accept: application/octet-stream" "https://github.com/liamg/shox/releases/download/v0.0.12/shox-linux-amd64" --output ./shox
chmod +x ./shox
sudo mv ./shox /bin/shox
shox

Cheers 💯

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

4 participants