mirror of
https://github.com/Cheviiot/Nivora.git
synced 2026-08-03 15:51:12 +00:00
feat: create autonomous Nivora package repository
Maintain a validated cross-distribution package catalog. Automate upstream updates, isolated builds, diagnostics, and direct publication. Build the official GitHub Desktop sources for Linux with working OAuth.
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
repo_root="$(cd "${script_dir}/.." && pwd)"
|
||||
launcher="${repo_root}/happ/happ-launcher"
|
||||
staplerfile="${repo_root}/happ/Staplerfile"
|
||||
tmp_dir="$(mktemp -d)"
|
||||
trap 'rm -r -- "$tmp_dir"' EXIT
|
||||
|
||||
cp "$launcher" "${tmp_dir}/launcher-env"
|
||||
sed -i 's|/opt/happ/bin/Happ|/usr/bin/env|' "${tmp_dir}/launcher-env"
|
||||
|
||||
default_env="$(env -u QT_QPA_PLATFORMTHEME "${tmp_dir}/launcher-env")"
|
||||
grep -qx 'QT_QPA_PLATFORMTHEME=xdgdesktopportal' <<<"$default_env"
|
||||
|
||||
custom_env="$(QT_QPA_PLATFORMTHEME=qt6ct "${tmp_dir}/launcher-env")"
|
||||
grep -qx 'QT_QPA_PLATFORMTHEME=qt6ct' <<<"$custom_env"
|
||||
|
||||
cp "$launcher" "${tmp_dir}/launcher-args"
|
||||
sed -i 's|/opt/happ/bin/Happ|/usr/bin/printf|' "${tmp_dir}/launcher-args"
|
||||
forwarded="$("${tmp_dir}/launcher-args" '%s:%s' first second)"
|
||||
[[ "$forwarded" == 'first:second' ]]
|
||||
|
||||
grep -Fq "sed -i 's|^Exec=/opt/happ/bin/Happ|Exec=/usr/bin/happ|'" "$staplerfile"
|
||||
|
||||
echo 'OK: launcher Happ использует системную тему через XDG Desktop Portal'
|
||||
Reference in New Issue
Block a user