Skip to content

Instantly share code, notes, and snippets.

@larryv
Created December 30, 2014 23:20
Show Gist options
  • Save larryv/4c7905228050a46f66d4 to your computer and use it in GitHub Desktop.
Save larryv/4c7905228050a46f66d4 to your computer and use it in GitHub Desktop.
generate list of p5-* ports with version and incremented revision
port -q info --index --line --version --revision --name 'p5-*' | awk '
BEGIN {
blacklist["p5-app-ack"] = ""
blacklist["p5-catalyst-plugin-unicode-encoding"] = ""
blacklist["p5-class-mop"] = ""
blacklist["p5-email-mime-modifier"] = ""
blacklist["p5-graveyard"] = ""
blacklist["p5-test-tester"] = ""
blacklist["p5-test-use-ok"] = ""
}
{
if ($3 in blacklist) next
padding = (48 - length($3)) / 8
if (padding != int(padding)) padding = int(padding) + 1
printf "%s", $3
for (i = 0; i < padding; ++i) printf "\t"
printf "%s_%d%s", $1, ($2 + 1), ORS
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment