Created
December 3, 2023 20:07
-
-
Save jim-p/617ad36c52d4b844c24608e833b73242 to your computer and use it in GitHub Desktop.
Script to check options for software compiled from ports for changed/non-standard options
This file contains 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
#!/bin/sh | |
for p in $(pkg upgrade -n | grep 'options changed' | awk '{print $1}'); do | |
pkg_name=$(pkg query %n ${p}) | |
echo ${pkg_name} | |
pkg query "%Ok %Ov" ${pkg_name} | while read lkey lval; do | |
pkg rquery -U "%Ok %Ov" ${pkg_name} | while read rkey rval; do | |
if [ "${lkey}" = "${rkey}" -a "${lval}" != "${rval}" ]; then | |
echo -e "\t${lkey}\t${lval}\t${rval}\n" | |
fi | |
done | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment