Created
July 5, 2022 17:59
-
-
Save gliwka/48936b38159d6e946dcbd0ad89b2451e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Usage: $0 <chrome-extension-id>" | |
echo "To use the extension, make sure to enable the developer tools in Safari" | |
echo "Also enable Developers -> Allow unsigned extensions (at the bottom of the Menu)" | |
echo "Good luck and have fun!" | |
set -euxo pipefail | |
rm -rf ~/.extensions/$1 | |
mkdir -p ~/.extensions/$1/safari ~/.extensions/$1/chrome | |
cd ~/.extensions/$1 | |
curl -L "https://clients2.google.com/service/update2/crx?response=redirect&os=win&arch=x64&os_arch=x86_64&nacl_arch=x86-64&prod=chromiumcrx&prodchannel=beta&prodversion=79.0.3945.53&lang=ru&acceptformat=crx3&x=id%3D$1%26installsource%3Dondemand%26uc" -o extension.crx | |
unzip extension.crx -d chrome || true | |
xcrun safari-web-extension-converter --macos-only --no-open --force --project-location safari chrome | |
cd safari/*/ | |
xcodebuild build | |
open build/Release/*.app/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment