#!/usr/bin/env ruby require 'neo4j' if ARGV.length == 0 puts < TEXT exit end if ARGV.include?('community') require 'neo4j-community' # not really needed elsif ARGV.include?('advanced') require 'neo4j-advanced' # not really needed elsif ARGV.include?('enterprise') require 'neo4j-enterprise' # not really needed else puts 'Expected community, advanced, enterprise' exit(-1) end lib_dir = File.join(Dir.pwd, 'lib') fail "Expected a lib folder where to copy the jars file, mkdir #{lib_dir}? " unless File.exist?(lib_dir) files = $CLASSPATH.find_all { |x| x =~ /\.jar$/ }.collect { |y| y.sub('file:', '') } files.each { |file| FileUtils.cp(file, lib_dir) } puts "copied #{files.size} files to #{lib_dir}"