Created
December 26, 2022 13:37
-
-
Save jmroot/f84c329919356bfb1ed2d8425f3cfebb to your computer and use it in GitHub Desktop.
Check which MacPorts ports are binary distributable
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
#!/usr/bin/env port-tclsh | |
# For every available port, outputs the port name to distributable.txt | |
# if binaries are considered distributable, or to not-distributable.txt | |
# if not (along with an explanation). | |
# Set this to where distributable_lib.tcl can be found | |
set distributable_lib_path . | |
package require macports | |
mportinit | |
source ${distributable_lib_path}/distributable_lib.tcl | |
set yesfile [open ./distributable.txt w] | |
set nofile [open ./not-distributable.txt w] | |
foreach {portname infolist} [mportlistall] { | |
set distributable_results [check_licenses $portname [list]] | |
if {[lindex $distributable_results 0] == 0} { | |
puts $yesfile $portname | |
} else { | |
puts $nofile "$portname [lindex $distributable_results 1]" | |
} | |
} | |
close $yesfile | |
close $nofile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment