[PATCH 0/2] small mtd-utils fixes

Mike Frysinger vapier.adi at gmail.com
Sun Nov 20 23:22:03 EST 2011


On Sun, Nov 20, 2011 at 08:08, Artem Bityutskiy wrote:
> usage() {
>        cat <<EOF
> Usage: ${0##*/} <new_ver> <outdir>
>
> <new_ver>  - mtd utils version to create in X.Y.Z format
> <outdir>   - the output directory where to store the tarball with the
>             gpg signature
> EOF
>        exit 0
> }

i'd have outdir be optional and default to $PWD

prob want to update .gitignore to ignore "mtd-utils-*.tar*"

> # Change the version in the Makefile
> tmpfile="$(mktemp)"
> sed -e "s/^VERSION = [[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/VERSION = $new_ver/" \
>        Makefile > "$tmpfile"
> mv "$tmpfile" Makefile

use `sed -i` and you won't need the $tmpfile at all

> gpg --detach-sign -a "$outdir/$release_name.tar.bz2" > "$outdir/$release_name.tar.bz2.asc"

by using --detach-sign, you don't want the output redirection.  so
delete the "> .......".

> echo "Created $outdir/$release_name.tar.bz2"
> echo "Please, verify, then push the tag and upload the tarball and the signature"
> echo "You can use these commands:"
> echo "git push $tag_name"
> echo "scp $outdir/$release_name.tar.bz2 $outdir/$release_name.tar.bz2.asc casper.infradead.org:/var/ftp/pub/mtd-utils"

if you really like, you could make this a single cat like in the usage()
-mike



More information about the linux-mtd mailing list