]> git.ipfire.org Git - thirdparty/openssl.git/blame - util/mktar.sh
run-checker-daily.yml: If the openssl app is not built do not run it
[thirdparty/openssl.git] / util / mktar.sh
CommitLineData
8c209eee 1#! /bin/sh
33388b44 2# Copyright 2018-2020 The OpenSSL Project Authors. All Rights Reserved.
b42922ea 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
9HERE=`dirname $0`
10
1dfdbd5b 11# Get all version data as shell variables
b013cf90 12. $HERE/../VERSION.dat
1dfdbd5b
RL
13
14if [ -n "$PRE_RELEASE_TAG" ]; then PRE_RELEASE_TAG=-$PRE_RELEASE_TAG; fi
83a5bd80 15if [ -n "$BUILD_METADATA" ]; then BUILD_METADATA=+$BUILD_METADATA; fi
1dfdbd5b 16version=$MAJOR.$MINOR.$PATCH$PRE_RELEASE_TAG$BUILD_METADATA
8c209eee
RL
17basename=openssl
18
19NAME="$basename-$version"
20
21while [ $# -gt 0 ]; do
22 case "$1" in
23 --name=* ) NAME=`echo "$1" | sed -e 's|[^=]*=||'` ;;
24 --name ) shift; NAME="$1" ;;
25 --tarfile=* ) TARFILE=`echo "$1" | sed -e 's|[^=]*=||'` ;;
26 --tarfile ) shift; TARFILE="$1" ;;
27 * ) echo >&2 "Could not parse '$1'"; exit 1 ;;
28 esac
29 shift
30done
31
32if [ -z "$TARFILE" ]; then TARFILE="$NAME.tar"; fi
33
34# This counts on .gitattributes to specify what files should be ignored
3eb99601 35git archive --worktree-attributes -9 --prefix="$NAME/" -o $TARFILE.gz -v HEAD
8c209eee 36
3be38943
RL
37# Good old way to ensure we display an absolute path
38td=`dirname $TARFILE`
39tf=`basename $TARFILE`
40ls -l "`cd $td; pwd`/$tf.gz"