]>
Commit | Line | Data |
---|---|---|
8c209eee | 1 | #! /bin/sh |
b42922ea RL |
2 | # Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. |
3 | # | |
9059ab42 | 4 | # Licensed under the Apache License 2.0 (the "License"). You may not use |
b42922ea RL |
5 | # this file except in compliance with the License. You can obtain a copy |
6 | # in the file LICENSE in the source distribution or at | |
7 | # https://www.openssl.org/source/license.html | |
8c209eee RL |
8 | |
9 | HERE=`dirname $0` | |
10 | ||
11 | version=`grep 'OPENSSL_VERSION_TEXT *"OpenSSL' $HERE/../include/openssl/opensslv.h | sed -e 's|.*"OpenSSL ||' -e 's| .*||'` | |
12 | basename=openssl | |
13 | ||
14 | NAME="$basename-$version" | |
15 | ||
16 | while [ $# -gt 0 ]; do | |
17 | case "$1" in | |
18 | --name=* ) NAME=`echo "$1" | sed -e 's|[^=]*=||'` ;; | |
19 | --name ) shift; NAME="$1" ;; | |
20 | --tarfile=* ) TARFILE=`echo "$1" | sed -e 's|[^=]*=||'` ;; | |
21 | --tarfile ) shift; TARFILE="$1" ;; | |
22 | * ) echo >&2 "Could not parse '$1'"; exit 1 ;; | |
23 | esac | |
24 | shift | |
25 | done | |
26 | ||
27 | if [ -z "$TARFILE" ]; then TARFILE="$NAME.tar"; fi | |
28 | ||
29 | # This counts on .gitattributes to specify what files should be ignored | |
30 | git archive --worktree-attributes --format=tar --prefix="$NAME/" -v HEAD \ | |
31 | | gzip -9 > "$TARFILE.gz" | |
32 | ||
3be38943 RL |
33 | # Good old way to ensure we display an absolute path |
34 | td=`dirname $TARFILE` | |
35 | tf=`basename $TARFILE` | |
36 | ls -l "`cd $td; pwd`/$tf.gz" |