File: flatpak.sh

package info (click to toggle)
wxformbuilder 4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,908 kB
  • sloc: cpp: 37,318; xml: 6,611; javascript: 1,353; python: 94; sh: 62; makefile: 62
file content (22 lines) | stat: -rwxr-xr-x 1,003 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
#!/bin/bash
set -eux

FLATHUB=https://flathub.org/repo/flathub.flatpakrepo

# needed in github-ci
if [ `id -u` == 0 ]; then
  command -v dnf && { dnf upgrade -y ; dnf install -y flatpak-builder git wget; }
fi

NOTFOUND=""
command -v flatpak         >/dev/null 2>&1 || NOTFOUND="$NOTFOUND flatpak"
command -v flatpak-builder >/dev/null 2>&1 || NOTFOUND="$NOTFOUND flatpak-builder"
command -v git             >/dev/null 2>&1 || NOTFOUND="$NOTFOUND git"
command -v wget            >/dev/null 2>&1 || NOTFOUND="$NOTFOUND wget"
test -z "$NOTFOUND" || { echo "$NOTFOUND: not found, but needed. please install. Aborting. "; exit 1; }

flatpak --user remote-add --if-not-exists flathub $FLATHUB
flatpak --user install -y flathub org.freedesktop.Platform 23.08
flatpak --user install -y flathub org.freedesktop.Sdk 23.08
flatpak-builder --force-clean --repo=repo ./build org.wxformbuilder.wxFormBuilder.json
flatpak build-bundle repo wxFormBuilder.flatpak org.wxformbuilder.wxFormBuilder --runtime-repo=$FLATHUB