Skip to content
Snippets Groups Projects
Commit d9143654 authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

upraveno na automaticke zjistovani pouzitych perlovych modulu a jejich...

upraveno na automaticke zjistovani pouzitych perlovych modulu a jejich lokalnich verzi v danem adresari
parent 21a4e9b9
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#
# Script obtain Perl package version
# The script automatically obtain Perl modules and their local version
# in set directory (recursively)
#
#modules=(LWP::Protocol::https)
modules=(SOAP::Lite SOAP::Transport::HTTP DBI DBD::mysql Format::Human::Bytes Sys::Syslog File::Basename Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL MIME::Base64 Crypt::X509 Carp)
for module in ${modules[@]}
if [[ -z $1 || ! -d $1 ]]; then
echo "Usage: ${0##*/} <directory>"
exit 1
fi
modules_file="/tmp/warden-server-modules.txt"
sed '/^use [A-Z]/!d; /Warden/d' `find $1 -type f` 2>/dev/null | cut -f 2 -d " " | sed 's/;//' | sort -u > $modules_file
for module in $(<$modules_file);
do
perl -e "eval { require $module; }; if (\$@) { print \"$module: version not found\n\"; } else { print \"$module >= \$$module::VERSION\n\"}"
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment