Skip to content

Instantly share code, notes, and snippets.

@uvesten
Forked from claui/gettext_workaround.log
Last active October 29, 2020 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uvesten/e5e872107226e56b81fc699a9e93e26a to your computer and use it in GitHub Desktop.
Save uvesten/e5e872107226e56b81fc699a9e93e26a to your computer and use it in GitHub Desktop.
Code signature workaround for dylibs on macOS 11.0 (Apple Silicon)
# add the following to .zshenv
replace_inode() {
local filename
for filename; do
chmod o+w "${filename}"
rm -f "${filename}.bak"
mv -f "${filename}" "${filename}.bak"
cp "${filename}.bak" "${filename}"
rm -f "${filename}.bak"
done
}
# then run
$ find /usr/local -type f -name '*.dylib' -print0 \
| xargs -r0 zs -c 'replace_inode "$@" && codesign -s - -f "$@"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment