Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 9th, 2012  |  syntax: None  |  size: 0.31 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How can I cleanly include Ruby code to be written to git's post-commit hook within C code?
  2. char * post_commit_hook = <<Ruby code here>>
  3.        
  4. hook.h : hook.rb
  5.     ./rb2h POST_COMMIT_HOOK < $< > $@
  6.        
  7. #!perl -w
  8. print "#define $ARGV[0] \n";
  9. chomp, s/\/\\/g, s/"/\"/g, print "t"$_" \n" for <STDIN>;
  10. print "t""n"