Sha256: 082bc90e1710d690e1ec6b228fbed91258ad13816200f65e82db60140a7aa61c

Contents?: true

Size: 895 Bytes

Versions: 5

Compression:

Stored size: 895 Bytes

Contents

#!/usr/bin/env ruby
#
# acts_as_ferret gem install script
#
# Call this from Rails.root to install start/stop script, sample config and
# Capistrano recipes into your rails project.

require 'fileutils'

@basedir = File.join(File.dirname(__FILE__), '..')

def install(src, target_dir, executable=false, overwrite=false)
  puts "Installing: #{src}"
  src = File.join(@basedir, src)
  fname = File.basename(src)
  target = File.join(target_dir, fname)
  if !overwrite && File.exists?(target)
    puts "#{target} already exists, skipping"
  else
    FileUtils.rm_f target
    FileUtils.mkdir_p target_dir
    FileUtils.cp src, target
    FileUtils.chmod 0755, target if executable
  end
end


install 'script/ferret_server', 'script', true, true
install 'config/ferret_server.yml', 'config'
install 'recipes/aaf_recipes.rb', 'lib/recipes', false, true

puts IO.read(File.join(@basedir, 'README'))

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
acts_as_ferret-0.5.4 bin/aaf_install
acts_as_ferret-0.5.3 bin/aaf_install
acts_as_ferret-0.5.2 bin/aaf_install
acts_as_ferret-0.5.1 bin/aaf_install
acts_as_ferret-0.5 bin/aaf_install