Skip to content

Instantly share code, notes, and snippets.

@lgarron
Last active February 11, 2026 07:47
Show Gist options
  • Select an option

  • Save lgarron/73cf22ed381ef9786739ee5abd816c59 to your computer and use it in GitHub Desktop.

Select an option

Save lgarron/73cf22ed381ef9786739ee5abd816c59 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Setup script for a checkout of the Chromium HSTS preload list.
# Source -> medium.com/p/8c8896f5cef3 and gist.github.com/hemanth/7611535
echo "---- Creating folder and initializing a git repository. ----"
mkdir chromium-hsts && cd chromium-hsts
git init
echo "---- Adding chromium remote and initializing sparse checkout of /net/http. ----"
git remote add origin https://chromium.googlesource.com/chromium/src
git config core.sparsecheckout true
echo net/http >> .git/info/sparse-checkout
echo "---- Pulling Code ----"
git pull origin main --depth 1
echo "See https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md"
@dko1905
Copy link

dko1905 commented Feb 9, 2026

Last command should be changed to:

git pull origin main --depth 1

@lgarron
Copy link
Author

lgarron commented Feb 10, 2026

Good idea, I've updated it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment