Skip to content

Instantly share code, notes, and snippets.

@witsch
Created January 11, 2017 20:50
Show Gist options
  • Save witsch/906c4aab6dcc4eeaa3506d693c311bbb to your computer and use it in GitHub Desktop.
Save witsch/906c4aab6dcc4eeaa3506d693c311bbb to your computer and use it in GitHub Desktop.
Shell script to migrate symlinks created by Homebrew (see https://github.com/caskroom/homebrew-cask/issues/21913)
#!/bin/bash
which gfind || brew install findutils
gfind ~/Applications/ ~/Library/ /usr/local/ -type l -lname '/opt/homebrew-cask/*' -printf "ln -vsf '%l' '%p'\n" |\
sed s,/opt/homebrew-cask/,/usr/local/, |\
bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment