#!/usr/bin/env ruby lib = File.expand_path('../../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'git/multi' case (command = ARGV.shift) when /\A--/ case command when '--help' then Git::Multi::Commands.help when '--check' then Git::Multi::Commands.check when '--version' then Git::Multi::Commands.version when '--refresh' then Git::Multi::Commands.refresh when '--json' then Git::Multi::Commands.json when '--count' then Git::Multi::Commands.count when '--list' then Git::Multi::Commands.list when '--archived'then Git::Multi::Commands.archived when '--forked' then Git::Multi::Commands.forked when '--private' then Git::Multi::Commands.private when '--paths' then Git::Multi::Commands.paths when '--spurious'then Git::Multi::Commands.spurious when '--missing' then Git::Multi::Commands.missing when '--stale' then Git::Multi::Commands.stale when '--excess' then Git::Multi::Commands.excess when '--clone' then Git::Multi::Commands.clone when '--query' then Git::Multi::Commands.query(ARGV) when '--find' then Git::Multi::Commands.find(ARGV) when '--eval' then Git::Multi::Commands.eval(ARGV) when '--raw' then Git::Multi::Commands.raw(ARGV) else abort \ "Unknown 'git multi' command: #{command}\n\n" \ "(use --help/-h to list all available commands)" end when nil, '', '-h' Git::Multi::Commands.help else Git::Multi::Commands.report Git::Multi::Commands.exec command, ARGV end # That's all Folks!