Skip to content

Instantly share code, notes, and snippets.

@jim-p
Created December 3, 2023 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jim-p/617ad36c52d4b844c24608e833b73242 to your computer and use it in GitHub Desktop.
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
#!/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