Skip to content

Instantly share code, notes, and snippets.

@zigiprimo
Forked from AdaRoseCannon/code-server-update.sh
Last active April 9, 2020 13:18
Show Gist options
  • Save zigiprimo/c9619ac1f29f268047431af375d99476 to your computer and use it in GitHub Desktop.
Save zigiprimo/c9619ac1f29f268047431af375d99476 to your computer and use it in GitHub Desktop.
#!/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 -
mkdir -p $DIR
tar xvzf /tmp/code-server.tar.gz --strip=1 --overwrite --wildcards --no-anchored -C "$DIR" 'code-server'
chmod +x "$DIR/code-server"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment