Skip to content

Instantly share code, notes, and snippets.

@enil
Created May 17, 2015 14:51
Show Gist options
  • Save enil/c443ba6481fd9570bd9a to your computer and use it in GitHub Desktop.
Save enil/c443ba6481fd9570bd9a to your computer and use it in GitHub Desktop.
Creates links for Ruby 2.2 without the prefix (not needed)
#!/bin/sh
package=ruby22
suffix=2.2
for source in $(port contents $package | grep /opt/local/bin/); do
target=$(dirname $source)/$(basename $source $suffix)
ln -s $source $target
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment