]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- makedist produces sha1 and sha256 files for created binaries too.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 13 Jul 2015 07:53:53 +0000 (07:53 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 13 Jul 2015 07:53:53 +0000 (07:53 +0000)
git-svn-id: file:///svn/unbound/trunk@3448 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
makedist.sh

index 8c7051c4dc26a85c6074c0814d8361ab87a4782a..37ef28aea037996ce22841b331f11aacbcf5912c 100644 (file)
@@ -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.
index f060176683746ea7bcce62531b5aaea43f1d5251..dcaec27405acb00a439b662c1dfcb26128130822 100755 (executable)
@@ -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"