public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Allen Martin <amartin@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/2] tools, config.mk: add binutils-version
Date: Thu, 2 Aug 2012 10:12:31 -0700	[thread overview]
Message-ID: <20120802171230.GC7791@nvidia.com> (raw)
In-Reply-To: <201208011901.44205.vapier@gentoo.org>

On Wed, Aug 01, 2012 at 04:01:41PM -0700, Mike Frysinger wrote:
> On Wednesday 01 August 2012 18:46:18 Allen Martin wrote:
> > But maybe I'll rewrite it in prolog just to mess with you guys
> 
> i'd ack it if it were written in bf
> -mike
> 

Challenge accepted

#!/bin/sh
#
# binutils-version [-p] gas-command
#
# Prints the binutils version of `gas-command' in a canonical 4-digit
#form
# such as `0222' for binutils 2.22
#

gas="$*"

if [ ${#gas} -eq 0 ]; then
        echo "Error: No assembler specified."
        printf "Usage:\n\t$0 <gas-command>\n"
        exit 1
fi

tmp=$(mktemp)
echo '>>++++[<++++++++>-]>>+++++[>+++++++++<-]>+>,[>>++++[<++++++++>-]>>+++++[>\
+++++++++<-]>+>,]<<<<<<[<<<<<<]>>>>>>[<[<+>-]>[<<-<+>>>-]<<<[>>>+<<<-]>[>+<[-]]\
>>>>>>>>]<<<<<<[<<<<<<]>>>>>[>>>>>>]><<<<<<<<<<<<[-]<[-]++++++[>++++++++<-]>.>>\
>>>>.>>>>>>>>>>>>.>>>>>>.' > $tmp
$gas --version | bf -n $tmp
rm $tmp

-Allen
-- 
nvpublic

  reply	other threads:[~2012-08-02 17:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 23:45 [U-Boot] [PATCH v4 1/2] tools, config.mk: add binutils-version Allen Martin
2012-07-18 23:45 ` [U-Boot] [PATCH v4 2/2] arm: work around assembler bug Allen Martin
2012-07-19  6:06   ` Albert ARIBAUD
2012-07-19 15:08     ` Tom Rini
2012-08-01 17:34       ` Allen Martin
2012-10-04  8:47   ` Albert ARIBAUD
2012-07-19  3:11 ` [U-Boot] [PATCH v4 1/2] tools, config.mk: add binutils-version Mike Frysinger
2012-07-19 15:08   ` Tom Rini
2012-07-19 15:21     ` Mike Frysinger
2012-07-19 15:38       ` Tom Rini
2012-07-19 16:43         ` Mike Frysinger
2012-07-19 16:54           ` Tom Rini
2012-08-01 22:31             ` Mike Frysinger
2012-08-01 22:46               ` Allen Martin
2012-08-01 22:55                 ` Graeme Russ
2012-08-01 23:01                 ` Mike Frysinger
2012-08-02 17:12                   ` Allen Martin [this message]
2012-08-02 19:30                     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120802171230.GC7791@nvidia.com \
    --to=amartin@nvidia.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox