- #
- # debian_list_all_licenses.ksh - Prototype for a License
- # collection script
- # In: All licenses of all installed Debian pacakges
- # Out: ksh93 compound variable which contains all license info
- #
- compound data=(
- compound -A licenses
- )
- typeset pkgname
- typeset s
- typeset hash
- for i in /usr/share/doc/*/ ; do
- pkgname="$(basename "$i")"
- printf '#### Processing package name: %q\n' "$pkgname"
- [[ -f "$i/copyright" ]] || continue
- hash="$(strings "$i/copyright" | sed -E 's/[[:space:]]//g' | md5sum | read var dummy ; print -- "$var")"
- if [[ ! -v data.licenses[$hash] ]] ; then
- typeset -a data.licenses[$hash].packagelist
- data.licenses[$hash].text="$( <"$i/copyright" )"
- fi
- data.licenses[$hash].packagelist+=( "$pkgname" )
- done
- print -v data
debian_list_all_licenses.ksh - collection scriptPrototype for a License
Posted by Anonymous on Wed 11th Dec 2024 10:47
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.