Ticket #43638: update-27-symlinks

File update-27-symlinks, 272 bytes (added by Tatsh (Andrew Udvare), 10 years ago)
Line 
1#!/usr/bin/env bash
2
3old_ifs="$IFS"
4IFS=$'\n'
5cd ~/usr/bin
6
7for i in $(find /opt/local/bin -maxdepth 1 \( -type f -o -type l \) -iname '*-2.7'); do
8    loc=$(basename "$i" | sed -e 's/-2.7$//')
9    if [ -L "$loc" ]; then
10        continue
11    fi
12    ln -s "$i" "$loc"
13done