Created
July 14, 2017 04:03
-
-
Save Kif11/ef1fd934669648c13eb68f14084b81cc to your computer and use it in GitHub Desktop.
Creates PATH sumlinks for all versions of Nuke installed
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
#!/usr/bin/env bash | |
function bootstrap_nuke { | |
# Find all versions of Nuke installed | |
# and sumlink them to /usr/local/bin | |
nukes=$( | |
find /Applications/Nuke* -maxdepth 1 -type d -name Nuke* \ | |
| egrep '(Nuke|NukeX)[0-9]+.[0-9]+v[0-9]+\.app' | |
) | |
echo "Creating following links:" | |
for path in ${nukes[@]}; do | |
root=${path%/*} | |
app_name=${path##*/} | |
exec_name=${app_name%*.app} | |
if [[ $exec_name == *NukeX* ]]; then | |
exec_path=$path/$exec_name | |
else | |
exec_path=$path/Contents/MacOS/$exec_name | |
fi | |
echo " $exec_path -> /usr/local/bin/$exec_name" | |
ln -s $exec_path /usr/local/bin/${exec_name} | |
done | |
} | |
bootstrap_nuke |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment