Initial checkin.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
commit
30132626b8
68 changed files with 5497 additions and 0 deletions
36
doc/get-perl-modules.sh
Normal file
36
doc/get-perl-modules.sh
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $Id: $
|
||||
#
|
||||
# Search for required Perl modules, translate to required package names.
|
||||
#
|
||||
export "LANG=C"
|
||||
export "LC_ALL=C"
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
req_modules="required-perl-modules.txt"
|
||||
req_deb="required-deb-packages.txt"
|
||||
req_rpm="required-rpm-packages.txt"
|
||||
|
||||
find "${HUHU_DIR}" -type f -name '*.p[lm]' -exec \
|
||||
gawk -F '[[:space:]();]+' '
|
||||
$1 == "use" && $2 ~ /::/ && $2 !~ /^MOD::/ { print $2 }
|
||||
' {} \+ |
|
||||
sort -u > "${req_modules}"
|
||||
|
||||
if [ -f /etc/debian_version ]; then
|
||||
xargs locate < "${req_modules}" |
|
||||
sort -u |
|
||||
xargs -n1 dpkg -S |
|
||||
sed -ne 's/: .*//p' |
|
||||
sort -u > "${req_deb}"
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
xargs locate < "${req_modules}" |
|
||||
sort -u |
|
||||
xargs rpm -qf |
|
||||
sed -e '/ /d' |
|
||||
sort -u > "${req_rpm}"
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue