diff options
| author | Adam Vandenberg | 2014-05-10 10:15:25 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-05-10 10:15:25 -0700 |
| commit | 938413246252a60335ed3c7b47afb27dcbee07e1 (patch) | |
| tree | 6f27bdeb7fde9af419c3ec3632022050947b29e9 /Library/Formula | |
| parent | 9db9660db257e215531e3d275407af67c6289f2e (diff) | |
| download | homebrew-938413246252a60335ed3c7b47afb27dcbee07e1.tar.bz2 | |
sqlmap: simplify resources
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/sqlmap.rb | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Library/Formula/sqlmap.rb b/Library/Formula/sqlmap.rb index 7db0e87c7..49df3bcc7 100644 --- a/Library/Formula/sqlmap.rb +++ b/Library/Formula/sqlmap.rb @@ -55,21 +55,13 @@ class Sqlmap < Formula ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages" install_args = [ "setup.py", "install", "--prefix=#{libexec}" ] - resource("ibm-db").stage { system "python", *install_args } - resource("impacket").stage { system "python", *install_args } - resource("ntlm").stage { system "python", *install_args } - resource("pysqlite").stage { system "python", *install_args } + res = %w{ibm-db impacket ntlm pysqlite} + res << "mysql-python" if build.with? "mysql" + res << "psycopg2" if build.with? "postgresql" + res << "pyodbc" if build.with? "unixodbc" - if build.with? "mysql" - resource("mysql-python").stage { system "python", *install_args } - end - - if build.with? "postgresql" - resource("psycopg2").stage { system "python", *install_args } - end - - if build.with? "unixodbc" - resource("pyodbc").stage { system "python", *install_args } + res.each do |r| + resource(r).stage { system "python", *install_args } end prefix.install "doc", "extra", "plugins", "shell", "tamper", "txt", "udf", "xml", "sqlmap.conf" |
