mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-30 18:24:40 +01:00
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch. SonarCloud coverage shard fails on pre-existing teardown crashes that also fail on main (tests::scan_probes::a_browse_through_a_link_and_dot_dot_reads_the_folder_the_system_names and tests::lifecycle_037::a_widget_gesture_cancels_if_its_target_moves_between_resolution_and_the_press, the GPU warm-up thread at process exit), fixed by #4697; reported to the LightCraft owner. Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
30 lines
1.4 KiB
Bash
Executable File
30 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
# The Arch packager copies this file over bin/lightcraft (and bin/lightcraft-cli) and moves the
|
|
# real binaries into bin/.lightcraft-nightly/. Neither writes outside the Nightly profile.
|
|
self="$(readlink -f "$0")"
|
|
here="$(dirname "$self")"
|
|
# Never fall back to a relative path: an unresolvable $0 is a broken install, not a guess.
|
|
[ -n "$self" ] && [ "${here#/}" != "$here" ] || { echo "error: cannot resolve $0" >&2; exit 2; }
|
|
profile="${XDG_DATA_HOME:-${HOME:?HOME is required}/.local/share}/lightcraft-nightly"
|
|
case "$(basename "$0")" in
|
|
*-cli)
|
|
real_bin="$here/.lightcraft-nightly/lightcraft-cli"
|
|
case "${1:-}" in
|
|
--version | -V | --help | -h) exec "$real_bin" "$@" ;;
|
|
esac
|
|
# The headless CLI has no Launcher protocol: the same profile through its two host variables.
|
|
if [ -z "${LIGHTCRAFT_CONFIG_DIR+x}" ]; then export LIGHTCRAFT_CONFIG_DIR="$profile/Settings"; fi
|
|
if [ -z "${LIGHTCRAFT_LIBRARY+x}" ]; then export LIGHTCRAFT_LIBRARY="$profile/Library"; fi
|
|
exec "$real_bin" "$@"
|
|
;;
|
|
esac
|
|
real_bin="$here/.lightcraft-nightly/lightcraft"
|
|
case "${1:-}" in
|
|
# The Launcher's own profile form is passed on untouched (its root wins over this default), and
|
|
# the queries are answered without any profile.
|
|
--launch-profile | --profile-root | --version | -V | --help | -h) exec "$real_bin" "$@" ;;
|
|
esac
|
|
exec "$real_bin" --launch-profile nightly-v1 --profile-root "$profile" -- "$@"
|