1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

meson: Add dist target

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2017-05-04 22:26:03 +02:00
parent 27cc1a821a
commit 2140c9dffb
No known key found for this signature in database
GPG key ID: AC203F96E2C34BB7
3 changed files with 28 additions and 0 deletions

View file

@ -587,3 +587,8 @@ coverage-clean:
.PHONY: .FORCE
.FORCE:
EXTRA_DIST += \
doc/meson.build \
subprojects/libgwater/xcb/meson.build \
meson.build

View file

@ -439,3 +439,5 @@ if ohcount.found()
],
)
endif
run_target('dist', command: [ 'script/dist.sh' ])

21
script/dist.sh Executable file
View file

@ -0,0 +1,21 @@
#! /bin/sh
NAME=`mesonintrospect ${MESON_BUILD_ROOT} --projectinfo | tr ',[' '\n\n' | sed -n 1,/subprojects/p | grep name | cut -d'"' -f4`
VERSION=`mesonintrospect ${MESON_BUILD_ROOT} --projectinfo | tr ',[' '\n\n' | sed -n 1,/subprojects/p | grep version | cut -d'"' -f4`
PREFIX=${NAME}-${VERSION}
TAR=${MESON_BUILD_ROOT}/${PREFIX}.tar
rm -f ${TAR} ${TAR}.xz
git archive --prefix=${PREFIX}/ --format=tar HEAD > ${TAR}
(
git submodule | \
while read commit path ref; do
(
cd ${path}
git archive --prefix=${PREFIX}/${path}/ --format=tar ${commit} > tmp.tar
tar -Af ${TAR} tmp.tar
rm -f tmp.tar
)
done
)
xz ${TAR}