Skip to content

Instantly share code, notes, and snippets.

@bloatfan
Forked from muzi502/raw_github.sh
Created March 31, 2020 16:14
Show Gist options
  • Save bloatfan/606201d82a855621377a847f0155eb4e to your computer and use it in GitHub Desktop.
Save bloatfan/606201d82a855621377a847f0155eb4e to your computer and use it in GitHub Desktop.
#!/bin/bash
# data: 2020-03-31
# author: muzi502
# for: Fuck GFW and download some raw file form github without proxy using jsDelivr CDN
set -xue
# GitHub rul: https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh
# jsDelivr url: https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh/tools/install.sh
wget $(echo $1 | sed 's/raw.githubusercontent.com/cdn.jsdelivr.net\/gh/' \
| sed 's/github.com/cdn.jsdelivr.net\/gh/' \
| sed 's/\/master//' | sed 's/\/blob//' )
# curl $(echo $1 | sed 's/raw.githubusercontent.com/cdn.jsdelivr.net\/gh/' \
# | sed 's/github.com/cdn.jsdelivr.net\/gh/' \
# | sed 's/\/master//' | sed 's/\/blob//' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment