aboutsummaryrefslogtreecommitdiffstats
path: root/roms/edk2/CryptoPkg/Library/OpensslLib/openssl/util/mktar.sh
diff options
context:
space:
mode:
Diffstat (limited to 'roms/edk2/CryptoPkg/Library/OpensslLib/openssl/util/mktar.sh')
-rwxr-xr-xroms/edk2/CryptoPkg/Library/OpensslLib/openssl/util/mktar.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/roms/edk2/CryptoPkg/Library/OpensslLib/openssl/util/mktar.sh b/roms/edk2/CryptoPkg/Library/OpensslLib/openssl/util/mktar.sh
new file mode 100755
index 000000000..17115cf59
--- /dev/null
+++ b/roms/edk2/CryptoPkg/Library/OpensslLib/openssl/util/mktar.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the OpenSSL license (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| .*||'`
+basename=openssl
+
+NAME="$basename-$version"
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --name=* ) NAME=`echo "$1" | sed -e 's|[^=]*=||'` ;;
+ --name ) shift; NAME="$1" ;;
+ --tarfile=* ) TARFILE=`echo "$1" | sed -e 's|[^=]*=||'` ;;
+ --tarfile ) shift; TARFILE="$1" ;;
+ * ) echo >&2 "Could not parse '$1'"; exit 1 ;;
+ esac
+ shift
+done
+
+if [ -z "$TARFILE" ]; then TARFILE="$NAME.tar"; fi
+
+# This counts on .gitattributes to specify what files should be ignored
+git archive --worktree-attributes --format=tar --prefix="$NAME/" -v HEAD \
+ | gzip -9 > "$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"