Skip to content

Instantly share code, notes, and snippets.

@jimweirich
Created May 7, 2009 00:10
Show Gist options
  • Save jimweirich/107832 to your computer and use it in GitHub Desktop.
Save jimweirich/107832 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