mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- makedist produces sha1 and sha256 files for created binaries too.
git-svn-id: file:///svn/unbound/trunk@3448 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
f66a15d894
commit
da83146bce
2 changed files with 44 additions and 30 deletions
|
|
@ -1,3 +1,6 @@
|
|||
13 July 2015: Wouter
|
||||
- makedist produces sha1 and sha256 files for created binaries too.
|
||||
|
||||
9 July 2015: Wouter
|
||||
- 1.5.4 release tag
|
||||
- trunk has 1.5.5 in development.
|
||||
|
|
|
|||
71
makedist.sh
71
makedist.sh
|
|
@ -136,6 +136,44 @@ create_temp_dir () {
|
|||
cd $temp_dir
|
||||
}
|
||||
|
||||
# pass filename as $1 arg.
|
||||
# creates file.sha1 and file.sha256
|
||||
storehash () {
|
||||
case $OSTYPE in
|
||||
linux*)
|
||||
sha=`sha1sum $1 | awk '{ print $1 }'`
|
||||
sha256=`sha256sum $1 | awk '{ print $1 }'`
|
||||
;;
|
||||
freebsd*)
|
||||
sha=`sha1 $1 | awk '{ print $5 }'`
|
||||
sha256=`sha256 $1 | awk '{ print $5 }'`
|
||||
;;
|
||||
*)
|
||||
# in case $OSTYPE is gone.
|
||||
case `uname` in
|
||||
Linux*)
|
||||
sha=`sha1sum $1 | awk '{ print $1 }'`
|
||||
sha256=`sha256sum $1 | awk '{ print $1 }'`
|
||||
;;
|
||||
FreeBSD*)
|
||||
sha=`sha1 $1 | awk '{ print $5 }'`
|
||||
sha256=`sha256 $1 | awk '{ print $5 }'`
|
||||
;;
|
||||
*)
|
||||
sha=`sha1sum $1 | awk '{ print $1 }'`
|
||||
sha256=`sha256sum $1 | awk '{ print $1 }'`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
echo $sha > $1.sha1
|
||||
echo $sha256 > $1.sha256
|
||||
echo "hash of $1.{sha1,sha256}"
|
||||
echo "sha1 $sha"
|
||||
echo "sha256 $sha256"
|
||||
}
|
||||
|
||||
|
||||
|
||||
SNAPSHOT="no"
|
||||
RC="no"
|
||||
|
|
@ -311,6 +349,8 @@ if [ "$DOWIN" = "yes" ]; then
|
|||
mv unbound-$version.zip $cwd/.
|
||||
cleanup
|
||||
fi
|
||||
storehash unbound_setup_$version.exe
|
||||
storehash unbound-$version.zip
|
||||
ls -lG unbound_setup_$version.exe
|
||||
ls -lG unbound-$version.zip
|
||||
info "Done"
|
||||
|
|
@ -411,36 +451,7 @@ tar czf ../unbound-$version.tar.gz unbound-$version || error_cleanup "Failed to
|
|||
|
||||
cleanup
|
||||
|
||||
case $OSTYPE in
|
||||
linux*)
|
||||
sha=`sha1sum unbound-$version.tar.gz | awk '{ print $1 }'`
|
||||
sha256=`sha256sum unbound-$version.tar.gz | awk '{ print $1 }'`
|
||||
;;
|
||||
freebsd*)
|
||||
sha=`sha1 unbound-$version.tar.gz | awk '{ print $5 }'`
|
||||
sha256=`sha256 unbound-$version.tar.gz | awk '{ print $5 }'`
|
||||
;;
|
||||
*)
|
||||
# in case $OSTYPE is gone.
|
||||
case `uname` in
|
||||
Linux*)
|
||||
sha=`sha1sum unbound-$version.tar.gz | awk '{ print $1 }'`
|
||||
sha256=`sha256sum unbound-$version.tar.gz | awk '{ print $1 }'`
|
||||
;;
|
||||
FreeBSD*)
|
||||
sha=`sha1 unbound-$version.tar.gz | awk '{ print $5 }'`
|
||||
sha256=`sha256 unbound-$version.tar.gz | awk '{ print $5 }'`
|
||||
;;
|
||||
*)
|
||||
sha=`sha1sum unbound-$version.tar.gz | awk '{ print $1 }'`
|
||||
sha256=`sha256sum unbound-$version.tar.gz | awk '{ print $1 }'`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
echo $sha > unbound-$version.tar.gz.sha1
|
||||
echo $sha256 > unbound-$version.tar.gz.sha256
|
||||
storehash unbound-$version.tar.gz
|
||||
|
||||
info "Unbound distribution created successfully."
|
||||
info "SHA1sum: $sha"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue