#!/usr/bin/env ruby require 'pathname' gem_root = Pathname.new(File.expand_path("../..", __FILE__)) scripts_dir = gem_root + 'share' + 'scripts' subcommand = ARGV[0] || '__nosuch__' subcommand_path = scripts_dir + subcommand if subcommand_path.file? ARGV.shift Kernel.exec subcommand_path.to_s, *ARGV else docker_bin_path = `which docker`.chomp Kernel.exec docker_bin_path, *ARGV end