Last active
July 10, 2022 08:49
-
-
Save EkkoG/c2bb61656f6beec090bbcdc937585e67 to your computer and use it in GitHub Desktop.
A script used to replace Clash core with Clash.Meta core for Clash For Windows.
This file contains hidden or 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 | |
DEST="/Applications/Clash for Windows.app/Contents/Resources/static/files/darwin/x64/clash-darwin" | |
VERSION=v1.12.0 | |
ARCH= | |
if [[ $(uname -m) == 'arm64' ]]; then | |
ARCH=arm64 | |
else | |
ARCH=amd64 | |
fi | |
if [ -z "$1" ]; then | |
echo "Use default version: $VERSION" | |
else | |
VERSION=$1 | |
fi | |
curl -L "https://github.com/MetaCubeX/Clash.Meta/releases/download/$VERSION/Clash.Meta-darwin-$ARCH-$VERSION.gz" -o /tmp/clash.meta.gz | |
if [ -f /tmp/clash.meta ]; then | |
rm /tmp/clash.meta | |
fi | |
gunzip /tmp/clash.meta.gz | |
chmod +x /tmp/clash.meta | |
cp /tmp/clash.meta "$DEST" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment