1 | #!/bin/sh |
---|
2 | |
---|
3 | files="" |
---|
4 | ports="" |
---|
5 | for f in $(find /opt/local/bin -type f) $(find /opt/local/lib -name \*.dylib); do |
---|
6 | if [[ ! -L $f ]] && otool -L $f | grep -q 'libpng1[24]'; then |
---|
7 | files+="\n$f" |
---|
8 | ports+="\n$(port provides $f | cut -d ' ' -f 5)" |
---|
9 | fi |
---|
10 | done |
---|
11 | for f in $(find /opt/local/lib -name \*.la); do |
---|
12 | if grep -q 'libpng1[24]' $f; then |
---|
13 | files+="\n$f" |
---|
14 | ports+="\n$(port provides $f | cut -d ' ' -f 5)" |
---|
15 | fi |
---|
16 | done |
---|
17 | |
---|
18 | if [[ -n "$files" ]]; then |
---|
19 | echo "Files with old libpng references are:" |
---|
20 | echo $files |
---|
21 | echo |
---|
22 | echo "and are provided by these ports:" |
---|
23 | echo $ports | sort -u |
---|
24 | else |
---|
25 | echo "No files with old libpng references found." |
---|
26 | fi |
---|