Advertisement
Guest User

BlockCountries Installation aid

a guest
Nov 8th, 2010
875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if ! which perl > /dev/null 2>&1 ; then
  4. echo "You need to install perl"
  5. exit 1
  6. fi
  7.  
  8. function needs {
  9. m="$1"
  10. if ! perl -m"$m" -e'exit;' >/dev/null 2>&1 ; then
  11. echo "You need to install the perl module $m"
  12. echo "Fetch it from your distribution or from cpan"
  13. exit 1
  14. fi
  15. return 0
  16. }
  17.  
  18. needs File::Basename
  19. needs File::Path
  20. needs IO::Uncompress::Gunzip
  21. needs Locale::Country
  22. needs LWP::Simple
  23. needs NetAddr::IP
  24. needs Net::Domain
  25. needs Parse::Syslog
  26. needs POSIX
  27. needs Text::ParseWords
  28.  
  29. echo "All needed perl modules are installed"
  30.  
  31. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement