Skip to content

Instantly share code, notes, and snippets.

@chew-z
Created August 20, 2018 20:51
Show Gist options
  • Save chew-z/7b70da3724626ab04cfc9676bee18646 to your computer and use it in GitHub Desktop.
Save chew-z/7b70da3724626ab04cfc9676bee18646 to your computer and use it in GitHub Desktop.
#!/bin/env zsh
mkdir -p chrome-crx
id=$1
downloadUrl="https://clients2.google.com/service/update2/crx?response=redirect&prodversion=56.0&x=id%3D$id%26installsource%3Dondemand%26lang%3Den-US%26uc"
if [ ! -f "chrome-crx/$id.crx" ]; then
http --download --output "chrome-crx/$id.crx" "$downloadUrl"
fi
echo "To unpack create folder first. Go into folder and do: 7z x ../chrome-crx/$id.crx"
@chew-z
Copy link
Author

chew-z commented Aug 20, 2018

  • id is the id of Chrome extension something like (bmnlcjabgnpnenekpadlanbbkooimhnj) - it's right there in browser address bar
  • I am using httpie (you can replace with wget or curl)
  • You need 7z to unpack

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