From 5b17ef52b353aff2e395ba83166988d805ff7271 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 22 Jul 2014 22:56:45 +0200 Subject: [PATCH] Package file. --- package.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 package.sh diff --git a/package.sh b/package.sh new file mode 100755 index 000000000..681c20096 --- /dev/null +++ b/package.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +opwd="$PWD" +br=$(git branch | grep '\*' | sed 's/^..//') + +n=cpp-ethereum-src-$(date "+%Y%m%d%H%M%S" --date="1970-01-01 $(git log -1 --date=short --pretty=format:%ct) sec GMT")-$(grep "EthVersion = " libethential/Common.cpp | sed 's/^[^"]*"//' | sed 's/".*$//')-$(git rev-parse HEAD | cut -c1-6) + +cd /tmp +git clone "$opwd" $n +cd $n +git checkout $br +rm -f package.sh +cd .. +tar c $n | bzip2 -- > $opwd/../${n}.tar.bz2 +rm -rf $n +cd $opwd + +echo "SHA1(${n}.tar.bz2) = $(shasum $opwd/../${n}.tar.bz2 | cut -d' ' -f 1)" +