Entry 6378

bash heredoc

   

Submitted by tianon on Aug. 27, 2010 at 11:17 a.m.
Language: Bash. Code size: 671 bytes.

generate_email_header()
{
    # --- Email (all stdout will be the email)
    # Generate header
    cat <<-EOF
    To: $recipients
    Subject: ${emailprefix}$projectdesc $refname_type, $short_refname, ${change_type}d. $describe
    Content-Type: text/plain; charset=utf-8
    X-Git-Refname: $refname
    X-Git-Reftype: $refname_type
    X-Git-Oldrev: $oldrev
    X-Git-Newrev: $newrev
   
    This is an automated email from the git hooks/post-receive script. It was
    generated because a ref change was pushed to the repository containing
    the project "$projectdesc".
   
    The $refname_type, $short_refname has been ${change_type}d
    EOF
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).