summaryrefslogtreecommitdiff
path: root/build-aux/meson-dist
blob: bd19ec327b68958ebf5350286bbfe0008e859362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash

set -e
set -o pipefail

if test "$1" = ""; then
    echo "Version not provided" >&2
    exit 1
fi
if ! test -d "$2"; then
    echo "Source directory not provided" >&2
    exit 1
fi

# generate tarball version
echo "$1" > "$MESON_DIST_ROOT/.tarball-version"

# generate ChangeLog file
echo Generating ChangeLog...
(cd "$2" && exec git log --stat) > "$MESON_DIST_ROOT/ChangeLog"

# cleanup unwanted files
pushd "$MESON_DIST_ROOT"
rm \
    suppr.txt \
    git.mk \
    autogen.sh \
    build-aux/nss.supp \
    configure.ac \
    Makefile.am \
    src/Makefile.am \
    build-aux/glib-tap.mk \
    build-aux/tap-driver.sh \
    build-aux/tap-test
popd