Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 15 lines (15 sloc) 460 Bytes
#!/bin/zsh
# Idea by @ilovezfs
for dir in */; do
if [[ ! -d $dir ]]; then
continue
fi
if [[ -e $dir/bin/python2 ]]; then
interpreter=2
else
interpreter=3
fi
rm $dir/.Python
ln -s /usr/local/opt/python/Frameworks/Python.framework/Versions/$interpreter.*/Python $dir/.Python
echo /usr/local/opt/python/Frameworks/Python.framework/Versions/$interpreter.* > $dir/lib/python$interpreter*/orig-prefix.txt
done