office-gobmx/solenv/bin/generate-flatpak-manifest.sh
Christian Lohmaier ec4409a911 don't export entries from download.lst - only used by make
no need to plant that into the environment of every recipe. some Jenkins
Windows builders already run into "environment is too large for exec"
issue just by attempting a "xargs --show-limits </dev/null" from a dummy
rule within the make environment

Change-Id: I321fa9075532eef62a7d4e33a08c272276de717e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144217
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-15 22:42:00 +00:00

23 lines
637 B
Bash
Executable file

#!/bin/bash
# usage:
# make -s cmd cmd='${SRCDIR}/solenv/bin/generate-flatpak-manifest.sh master' > org.libreoffice.LibreOffice.json
set -euo pipefail
# convert FOO := BAR$(MICRO) to export FOO=BAR$MICRO
source <(sed -e's#\([^ ]\{1,\}\) := #export \1=#g' ${SRCDIR}/download.lst | sed -e 's#[)(]##g')
my_gitbranch="${1?}"
subst="-e s!@BRANCH@!${my_gitbranch?}!"
subst="${subst} $(
< ${SRCDIR}/solenv/flatpak-manifest.in \
sed ${subst} | \
grep -o '@[A-Z0-9_]*@' | while read var; do
temp=${var:1:-1}
echo -n " -e s/${var}/${!temp}/"
done
)"
exec sed ${subst} < "${SRCDIR}"/solenv/flatpak-manifest.in