This repository has been archived on 2023-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
office/install.sh
2023-10-15 23:03:27 +02:00

33 lines
987 B
Bash
Executable File

#!/bin/bash -e
CRI=(podman)
CRI_OPT=()
if [ -z "$WAYLAND_DISPLAY" ]; then
CRI_OPT+=(
--network=host
-e XAUTHORITY=/app/.Xauthority
-v "$XAUTHORITY:/app/.Xauthority:ro"
)
fi
[ -d office/ ] || ./get_office.sh
"${CRI[@]}" volume create -o=o=uid=1000 office || true
"${CRI[@]}" build -t office .
"${CRI[@]}" run --rm --name office \
"${CRI_OPT[@]}" \
--ipc=host \
--device /dev/dri/ \
-e DISPLAY \
-e XDG_RUNTIME_DIR \
-v /tmp/.X11-unix/:/tmp/.X11-unix \
-v "$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR" \
-v /usr/share/fonts/:/usr/share/fonts/:ro \
-v "$PWD:/mnt/:ro" \
-v office://app/ \
--entrypoint install.sh \
office \
/opt/cxoffice/bin/cxinstaller