Sha256: ec37e5db6065e9ca5c4d2c71e0e6e82a82dd9f998e0c257730cbdddfa8301fce

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

module Hyla
  class Command

    def self.globs(source, destination)
      Dir.chdir(source) do
        dirs = Dir['*'].select { |x| File.directory?(x) }
        dirs -= [destination, File.expand_path(destination), File.basename(destination)]
        dirs = dirs.map { |x| "#{x}/**/*" }
        dirs += ['*']
      end
    end

    program :int_block do
      # kill threads etc
      # make sure to exit or abort, otherwise your program keeps running
      Hyla::logger.warn "CTRL-C / Shutdown command received"
      exit 1
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyla-1.0 lib/hyla/command.rb