EVP: allow empty strings to EVP_Decode* functions
[openssl.git] / util / mktar.sh
index bf874a14d8a0b6489b9c621041afa6a98f7a0381..04b29e2e3a3b3d24b6938656fa1fbf15c3939b77 100755 (executable)
@@ -1,14 +1,18 @@
 #! /bin/sh
-# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2018-2020 The OpenSSL Project Authors. All Rights Reserved.
 #
-# Licensed under the OpenSSL license (the "License").  You may not use
+# Licensed under the Apache License 2.0 (the "License").  You may not use
 # this file except in compliance with the License.  You can obtain a copy
 # in the file LICENSE in the source distribution or at
 # https://www.openssl.org/source/license.html
 
 HERE=`dirname $0`
 
-version=`grep 'OPENSSL_VERSION_TEXT  *"OpenSSL' $HERE/../include/openssl/opensslv.h | sed -e 's|.*"OpenSSL ||' -e 's| .*||'`
+# Get all version data as shell variables
+. $HERE/../VERSION
+
+if [ -n "$PRE_RELEASE_TAG" ]; then PRE_RELEASE_TAG=-$PRE_RELEASE_TAG; fi
+version=$MAJOR.$MINOR.$PATCH$PRE_RELEASE_TAG$BUILD_METADATA
 basename=openssl
 
 NAME="$basename-$version"
@@ -30,4 +34,7 @@ if [ -z "$TARFILE" ]; then TARFILE="$NAME.tar"; fi
 git archive --worktree-attributes --format=tar --prefix="$NAME/" -v HEAD \
     | gzip -9 > "$TARFILE.gz"
 
-ls -l "$TARFILE.gz"
+# Good old way to ensure we display an absolute path
+td=`dirname $TARFILE`
+tf=`basename $TARFILE`
+ls -l "`cd $td; pwd`/$tf.gz"