mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
fix: The launcher downloads Steamify and writes the page's rows (Items.qml, items.json) where the page reads them ($sdir was empty in its own local); --list errors go to its log
This commit is contained in:
1 parent
a817b8a558
commit
0cc736776a
2 files changed
+14
-2
No files matched your search
@@ -44,6 +44,15 @@ don't fit a skill's step-by-step flow.
|
|||||||
its blocked stdin). A C++ module change needs an actual rebuild
|
its blocked stdin). A C++ module change needs an actual rebuild
|
||||||
(out-of-tree, in the build VM) and redeploying the `.so` — no shortcut.
|
(out-of-tree, in the build VM) and redeploying the `.so` — no shortcut.
|
||||||
|
|
||||||
|
## Shell pitfalls
|
||||||
|
|
||||||
|
`local a=/x b="$a/y"` expands every value before assigning any, so `b` is
|
||||||
|
`/y`: `calamares-online.sh` wrote the downloaded `steamify.sh` to
|
||||||
|
`/steamify.sh` and `items.json` to a nonexistent `/qml/`, silently (stderr
|
||||||
|
went to `/dev/null`), so the Steamify page always ran on build-time rows and
|
||||||
|
the Summary had no labels. Declare a variable in its own `local` before
|
||||||
|
using it, and send a step's errors to the launcher's log, not `/dev/null`.
|
||||||
|
|
||||||
## ISO permissions
|
## ISO permissions
|
||||||
|
|
||||||
`steamify-prepare.sh` fetches `steamify.sh` with `curl -o`, which doesn't
|
`steamify-prepare.sh` fetches `steamify.sh` with `curl -o`, which doesn't
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ EOF
|
|||||||
# Steamify: try the newest release before Calamares starts, so the page
|
# Steamify: try the newest release before Calamares starts, so the page
|
||||||
# and the install step both show/use it; keep the ISO's copy (from
|
# and the install step both show/use it; keep the ISO's copy (from
|
||||||
# steamify-prepare.sh) on any failure (no network, GitHub unreachable).
|
# steamify-prepare.sh) on any failure (no network, GitHub unreachable).
|
||||||
local sdir=/usr/local/share/steamify sbin="$sdir/steamify.sh" sqml="$sdir/qml"
|
# Separate statements: `local` expands all its values before assigning
|
||||||
|
# any, so "$sdir" would still be empty in the same one.
|
||||||
|
local sdir=/usr/local/share/steamify
|
||||||
|
local sbin="$sdir/steamify.sh" sqml="$sdir/qml"
|
||||||
local tmp; tmp="$(mktemp)"
|
local tmp; tmp="$(mktemp)"
|
||||||
if curl -fsSL --max-time 20 https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify.sh -o "$tmp" &&
|
if curl -fsSL --max-time 20 https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify.sh -o "$tmp" &&
|
||||||
grep -q -- '--defaults' "$tmp"; then
|
grep -q -- '--defaults' "$tmp"; then
|
||||||
@@ -68,7 +71,7 @@ EOF
|
|||||||
# punctuation and text fields Steamify itself writes: nothing here can
|
# punctuation and text fields Steamify itself writes: nothing here can
|
||||||
# break out of the property).
|
# break out of the property).
|
||||||
tmp="$(mktemp)"
|
tmp="$(mktemp)"
|
||||||
if "$sbin" --defaults --list > "$tmp" 2>/dev/null && [[ -s "$tmp" ]]; then
|
if "$sbin" --defaults --list > "$tmp" 2>> "$log" && [[ -s "$tmp" ]]; then
|
||||||
{ printf 'pragma Singleton\nimport QtQuick\n\nQtObject {\n readonly property var rows: '
|
{ printf 'pragma Singleton\nimport QtQuick\n\nQtObject {\n readonly property var rows: '
|
||||||
cat "$tmp"
|
cat "$tmp"
|
||||||
printf '\n}\n'
|
printf '\n}\n'
|
||||||
|
|||||||
Reference in new issue
Block a user