File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / arping / extra / mktarball
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Oct 18 13:16:10 2016 UTC (8 years ago) by misho
Branches: arping, MAIN
CVS tags: v2_21, v2_15_cross, v2_15, HEAD
arping v2.15

    1: #!/bin/sh
    2: 
    3: set -e
    4: 
    5: VERSION="$1"
    6: 
    7: if [ x"$VERSION" = x"" ]; then
    8:     echo "Usage: $0 <version>"
    9:     echo
   10:     echo "  Example:   $0 arping-2.11"
   11:     exit 1
   12: fi
   13: 
   14: if [ x"$VERSION" = x"latest" ]; then
   15:     VERSION="$(git tag | tail -1)"
   16: fi
   17: 
   18: if [ x"$VERSION" = x"HEAD" ]; then
   19:     VERSION="$(git describe)"
   20: fi
   21: 
   22: OUTPUT="$VERSION.tar.gz"
   23: echo "Writing $OUTPUT"
   24: 
   25: GITDIR="$(realpath .)"
   26: TMPDIR="$(mktemp -d)"
   27: 
   28: (
   29:     cd "$TMPDIR"
   30:     mkdir "$VERSION"
   31:     cd "$VERSION"
   32:     git init
   33:     git fetch "$GITDIR"
   34:     git fetch --tags "$GITDIR"
   35:     git checkout "$VERSION"
   36:     rm -fr .git
   37:     autoreconf -i
   38:     rm -fr autom4te.cache
   39:     cd ..
   40:     tar cfz - "$VERSION" > "$GITDIR/$OUTPUT"
   41: )
   42: rm -fr -- "$TMPDIR"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>