File: create_oxt.sh

package info (click to toggle)
parlatype-libreoffice-extension 2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 392 kB
  • sloc: python: 855; xml: 76; sh: 63; makefile: 4
file content (40 lines) | stat: -rw-r--r-- 778 bytes parent folder | download
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
36
37
38
39
40
#!/bin/bash
# Convenience script to produce an .oxt Extension package.

SOURCE_ROOT=$1
BUILD_ROOT=$2
TEMPDIR=$(mktemp --directory)
OXT="$BUILD_ROOT"/Parlatype.oxt

rm -f "$OXT"

# Add from source root
cd "$SOURCE_ROOT"/extension &&
zip -r "$OXT" \
	images \
	license \
	META-INF \
	options \
	python \
	toolbar \
	--exclude /*meson.build /*.in /*bundled_manifest.xml

# Copy pythonpath from components to macros
mkdir -p "$TEMPDIR"/python/macros
cp -r "$SOURCE_ROOT"/extension/python/components/pythonpath \
      "$TEMPDIR"/python/macros

cd "$TEMPDIR" &&
zip -r "$OXT" python
rm -r "$TEMPDIR"

# Add generated files from build root
cd "$BUILD_ROOT"/extension &&
zip -r "$OXT" \
	description \
	options \
	toolbar \
	description.xml

cd "$BUILD_ROOT"/po &&
zip -r "$OXT" locale