knot-dns/scripts/make-dev-archive.sh
Jakub Ružička ae7496d331 distro: update to latest apkg compat level 6
Modify scripts/make-archive.sh to output YAML only to stdout as required
by latest apkg compat level 6. All stdout was redirected to stderr.
2025-11-25 09:54:10 +01:00

19 lines
552 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
# Create a development tarball
#
# This script is used by apkg to generate archive from current sources.
# It must only output valid YAML to stdout!
set -o errexit -o nounset -o xtrace
cd "$(dirname ${0})/.."
# configure Knot DNS in order to create archive
autoreconf -if >&2
./configure >&2
# create archive and parse output for archive name
TARDIR=$(make dist 2>&1 | sed -n 's/tardir=\([^ ]\+\).*/\1/p')
# print created archive name
archive=$(ls -1 $TARDIR.tar.*)
echo "archive: '$archive'"