Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
DIR="$HOME/bin"
cd /tmp
curl -s https://api.github.com/repos/cdr/code-server/releases/latest \
| grep "browser_download_url.\+linux-x86_64.tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget --output-document=code-server.tar.gz -qi -
tar xvzf /tmp/code-server.tar.gz --strip=1 --overwrite --wildcards --no-anchored -C "$DIR" 'code-server'
chmod +x "$DIR/code-server"
@Clearmist

This comment has been minimized.

Copy link

Clearmist commented Dec 28, 2019

The release file naming scheme has changed slightly. wget will fail using this script. Change line 8 from linux-x64 to linux-x86_64.

@AdaRoseCannon

This comment has been minimized.

Copy link
Owner Author

AdaRoseCannon commented Dec 28, 2019

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.