diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:40 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:40 -0400 |
commit | 00bc0a3de99e088902379dcb2905fb1546c7eca2 (patch) | |
tree | d248b25166e49de203f8b85702a8c88af52c0339 /archive.sh | |
parent | df8f1d512c60a96f9041f9663b3fdc2db51cba33 (diff) |
Imported Upstream version 2.9.1
Diffstat (limited to 'archive.sh')
-rwxr-xr-x | archive.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/archive.sh b/archive.sh new file mode 100755 index 0000000..4d99a5d --- /dev/null +++ b/archive.sh @@ -0,0 +1,12 @@ +#!/bin/sh +FULLNAME="bibletime-$1" +TARNAME="${FULLNAME}.tar" +git archive --format=tar "--prefix=${FULLNAME}/" -o "$TARNAME" HEAD && bzip2 --best "$TARNAME" || exit +TARBZ2NAME="${TARNAME}.bz2" +BYTES=`stat '--format=%s' "$TARBZ2NAME"` +echo 'Details:' +echo " Filename: ${TARBZ2NAME}" +echo " File size: $BYTES bytes`echo $BYTES|awk '{s[2**30]="G";s[2**20]="M";hum[1024]="k";for(x=2**30;x>=1024;x/=1024){if($1>=x){printf " (%.2f %sB)\n",$1/x,s[x];break}}}'`" +echo " MD5SUM: `md5sum \"${TARBZ2NAME}\" |cut -b -32`" +echo " SHA1SUM: `sha1sum \"${TARBZ2NAME}\" |cut -b -40`" +echo " SHA256SUM: `sha256sum \"${TARBZ2NAME}\" |cut -b -64`" |