Skip to content

Instantly share code, notes, and snippets.

@peterdavidhamilton
Forked from jimweirich/gist:107832
Created May 7, 2009 12:53
Show Gist options
  • Save peterdavidhamilton/108082 to your computer and use it in GitHub Desktop.
Save peterdavidhamilton/108082 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# Execute the git, gem, or rake command, depending on the second argument
case ARGV.first
when /^(add|bisect|branch|checkout|clone|commit|diff|fetch|grep|init|log|merge|mv|pull|push|rebase|reset|rm|show|status|tag)$/
system "git #{ARGV.join(' ')}"
when /^(build|cert|check|cleanup|contents|dependency|environment|fetch|generate_index|help|install|list|lock|mirror|outdated|pristine|query|rdoc|search|server|sources|specification|stale|uninstall|unpack|update|which)$/
system "gem #{ARGV.join(' ')}"
else
system "rake #{ARGV.join(' ')}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment