diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-08-14 19:12:19 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-08-14 19:12:19 +0200 |
commit | 93944333c52050ab31d509fcee2333f2e166d945 (patch) | |
tree | 77e223a83bd35329987358ae6448a0ca661e731c /external/unbound/makedist.sh | |
parent | Merge pull request #369 (diff) | |
download | monero-93944333c52050ab31d509fcee2333f2e166d945.tar.xz |
update unbound
Diffstat (limited to 'external/unbound/makedist.sh')
-rwxr-xr-x | external/unbound/makedist.sh | 70 |
1 files changed, 40 insertions, 30 deletions
diff --git a/external/unbound/makedist.sh b/external/unbound/makedist.sh index f06017668..23c89fc3d 100755 --- a/external/unbound/makedist.sh +++ b/external/unbound/makedist.sh @@ -136,6 +136,43 @@ 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 +348,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 +450,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" |