diff options
author | Mike DePaulo <mikedep333@gmail.com> | 2014-09-17 08:38:22 -0400 |
---|---|---|
committer | Mike DePaulo <mikedep333@gmail.com> | 2014-09-17 08:38:22 -0400 |
commit | 1b0b435d4312e60cb6c6264e4027b77eeb95e7ac (patch) | |
tree | 6ed13466deaa15409133dea1b0ae89c0256d9dce | |
parent | a1c3e517f3e709b3f5e14eeba8caa93504d4715a (diff) | |
download | buildscripts-1b0b435d4312e60cb6c6264e4027b77eeb95e7ac.tar.gz buildscripts-1b0b435d4312e60cb6c6264e4027b77eeb95e7ac.tar.bz2 buildscripts-1b0b435d4312e60cb6c6264e4027b77eeb95e7ac.zip |
Add identify-cygwin-packages.sh to help with GPL compliance
-rwxr-xr-x | bin/identify-cygwin-packages.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/identify-cygwin-packages.sh b/bin/identify-cygwin-packages.sh new file mode 100755 index 0000000..ea2bee7 --- /dev/null +++ b/bin/identify-cygwin-packages.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +export OUT="cygwin files and packages.csv" + +if [[ $# == 0 ]]; then + echo "Example usage: $0 /bin/sh.exe /bin/libgcc_s-1.dll" + echo "Output will be appended to \"${OUT}\"" + echo "This script is intended to help with GPL compliance." + echo "Currently this script does not identify the source package," + echo "Only the binary package." + echo "Browse a cygwin mirror or use Google/DuckDuckGo to identify the source package." +fi + +echo "File,Binary Package w/ Version,Source Package" >> "${OUT}" + +for file in "$@" +do + binPkg=`cygcheck -f $file| tr -d '\r' | tr -d '\n'` + echo "${file},${binPkg}," >> "${OUT}" +done |