summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-11-08 21:29:05 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-11-10 11:02:02 +0100
commitc5f620f9f6abae0213fdda17fae10f281b7bdf9f (patch)
tree7e5f87d5f5290e83fa05bbf7fa8c1adbd9d8a859 /solenv/bin
parent8e8e72f08b01a284cf1a90b888d48acfb6a33d2e (diff)
add generate-flatpak-manifest.sh to generate FlatPak manifest
Duplication of external tarballs in flatpak-manifest.in is a maintenance nightmare. The only difference between the current flatpak-manifest.in and the one generated from: make -s cmd cmd='${SRCDIR}/solenv/bin/generate-flatpak-manifest.sh master' > org.libreoffice.LibreOffice.json ... is that the current one contains an outdated reference to zxing-cpp-1.1.1.tar.gz which was upgraded to zxing-cpp-1.2.0.tar.gz in download.lst. Change-Id: I98ab9346244f2c0d788da391928fcb4ffebbe23f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124891 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'solenv/bin')
-rwxr-xr-xsolenv/bin/generate-flatpak-manifest.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/solenv/bin/generate-flatpak-manifest.sh b/solenv/bin/generate-flatpak-manifest.sh
new file mode 100755
index 000000000000..26359b4a464b
--- /dev/null
+++ b/solenv/bin/generate-flatpak-manifest.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# usage:
+# make -s cmd cmd='${SRCDIR}/solenv/bin/generate-flatpak-manifest.sh master' > org.libreoffice.LibreOffice.json
+
+set -euo pipefail
+
+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