<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">derp, thanks! I sent the wrong diff....<br>
      <br>
      On 06/10/2014 09:27 AM, Mike McLean wrote:<br>
    </div>
    <blockquote
cite="mid:CAJ=Sm7G9ORKpVSUVs5W0mVDyaOwTZQWXpJTTTi96633vShSUug@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">typo<br>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Tue, Jun 10, 2014 at 10:12 AM,
            Karanbir Singh <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:mail-lists@karan.org" target="_blank">mail-lists@karan.org</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Applied,
              pushed, thanks<br>
              <a moz-do-not-send="true"
                href="https://git.centos.org/summary/centos-git-common"
                target="_blank">https://git.centos.org/summary/centos-git-common</a><br>
              <div>
                <div><br>
                  <br>
                  On 06/10/2014 03:08 PM, Pat Riehecky wrote:<br>
                  > From: Pat Riehecky <<a moz-do-not-send="true"
                    href="mailto:riehecky@fnal.gov" target="_blank">riehecky@fnal.gov</a>><br>
                  ><br>
                  > ---<br>
                  >  return_disttag.sh |   71
                  +++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
                  >  1 files changed, 71 insertions(+), 0
                  deletions(-)<br>
                  >  create mode 100755 return_disttag.sh<br>
                  ><br>
                  > diff --git a/return_disttag.sh
                  b/return_disttag.sh<br>
                  > new file mode 100755<br>
                  > index 0000000..cc4829c<br>
                  > --- /dev/null<br>
                  > +++ b/return_disttag.sh<br>
                  > @@ -0,0 +1,71 @@<br>
                  > +#!/bin/bash -u<br>
                  > +#<br>
                  > +# Extracts what appears to be the value of
                  %{dist} from the commit message<br>
                  > +#<br>
                  > +# Might want to drop this in ~/bin/ and chmod
                  u+x it<br>
                  > +<br>
                  >
                  +#####################################################################<br>
                  > +usage() {<br>
                  > +    echo ''                                    
                            >&2<br>
                  > +    echo "$0 [-hr]"                            
                            >&2<br>
                  > +    echo ''                                    
                            >&2<br>
                  > +    echo ' -h: This help message'              
                            >&2<br>
                  > +    echo ' -r: Use the Redhat tag rather than
                  centos tag' >&2<br>
                  > +    echo ''                                    
                            >&2<br>
                  > +    echo '  Attempt to extract what appears to
                  be the value of %{dist}' >&2<br>
                  > +    echo '  from the <a moz-do-not-send="true"
                    href="http://git.centos.org" target="_blank">git.centos.org</a>
                  commit message'       >&2<br>
                  > +    exit 1<br>
                  > +}<br>
                  > +<br>
                  > +<br>
                  >
                  +#####################################################################<br>
                  > +# setup args in the right order for making
                  getopt evaluation<br>
                  > +# nice and easy.  You'll need to read the
                  manpages for more info<br>
                  > +args=$(getopt -o hr -- "$@")<br>
                  > +if [[ $? -ne 0 ]]; then<br>
                  > +    usage<br>
                  > +fi<br>
                  > +eval set -- "$args"<br>
                  > +<br>
                  > +RHELTAG=0<br>
                  > +for arg in $@; do<br>
                  > +    case $1 in<br>
                  > +        -- )<br>
                  > +            # end of getopt args, shift off the
                  -- and get out of the loop<br>
                  > +            shift<br>
                  > +            break 2<br>
                  > +           ;;<br>
                  > +         -r )<br>
                  > +            # skip any package with 'centos' in
                  the dist area<br>
                  > +            RHELTAG=1<br>
                  > +           ;;<br>
                  > +         -h )<br>
                  > +            # get help<br>
                  > +            usage<br>
                  > +           ;;<br>
                  > +    esac<br>
                  > +done<br>
                  > +<br>
                  > +packagename=$(basename `pwd`)<br>
                  > +metadata=.${packagename}.metadata<br>
                  > +<br>
                  > +if [[ ! -e ${metadata} ]] ||  [[ ! -d .git ]] ||
                  [[ ! -d SOURCES ]]; then<br>
                  > +    echo 'You need to run this from inside a
                  sources git repo'<br>
                  > +    exit 1<br>
                  > +fi<br>
                  > +<br>
                  > +msg=$(git log --pretty=format:"%s")<br>
                  > +pkg=$(echo ${msg} | cut -d' ' -f2)<br>
                  > +<br>
                  > +if [[ ${RHELTAG} -eq 0 ]]; then<br>
                  > +    thispkg=(echo ${pkg} | head -1)<br>
                  > +elif [[ ${RHELTAG} -eq 1 ]]; then<br>
                  > +    thispkg=(echo ${pkg} grep -v centos | head
                  -1)<br>
                  > +else<br>
                  > +    echo 'Something went terribly wrong'<br>
                  > +    exit 1<br>
                  > +fi<br>
                  > +<br>
                  > +tag=$(echo ${thispkg} | awk -F"-" '{print $NF}'
                  | tr '.' '\012'| grep -e el[[:digit:]])<br>
                  > +<br>
                  > +echo ${tag}<br>
                  ><br>
                  <br>
                  <br>
                  --<br>
                </div>
              </div>
              <span><font color="#888888">Karanbir Singh<br>
                  <a moz-do-not-send="true" href="tel:%2B44-207-0999389"
                    value="+442070999389" target="_blank">+44-207-0999389</a> |
                  <a moz-do-not-send="true" href="http://www.karan.org/"
                    target="_blank">http://www.karan.org/</a> | <a
                    moz-do-not-send="true"
                    href="http://twitter.com/kbsingh" target="_blank">twitter.com/kbsingh</a><br>
                  GnuPG Key : <a moz-do-not-send="true"
                    href="http://www.karan.org/publickey.asc"
                    target="_blank">http://www.karan.org/publickey.asc</a><br>
                </font></span>
              <div>
                <div>_______________________________________________<br>
                  CentOS-devel mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:CentOS-devel@centos.org"
                    target="_blank">CentOS-devel@centos.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.centos.org/mailman/listinfo/centos-devel"
                    target="_blank">http://lists.centos.org/mailman/listinfo/centos-devel</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
CentOS-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS-devel@centos.org">CentOS-devel@centos.org</a>
<a class="moz-txt-link-freetext" href="http://lists.centos.org/mailman/listinfo/centos-devel">http://lists.centos.org/mailman/listinfo/centos-devel</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Pat Riehecky

Scientific Linux developer
<a class="moz-txt-link-freetext" href="http://www.scientificlinux.org/">http://www.scientificlinux.org/</a></pre>
  </body>
</html>