scripts, icon-fallbacks: small robustness nits

check-signatures reads changelist.txt directly instead of looping over a
one-element list; icon-fallbacks.sh declares its shell for shellcheck.
This commit is contained in:
Pierre Kisters committed 2026-09-27 23:26:59 +02:00
1 parent 990ee78fe7
commit 93d061b458
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
# shellcheck shell=bash
# Hicolor fallbacks for desktop entry icons that only Breeze has.
#
# Usage: steam-frame-icon-fallbacks [EXTRA_NAME...]
+2 -2
View File
@@ -150,8 +150,8 @@ function bundle(name) {
? readdirSync(stylesDir, { recursive: true }).filter((f) => f.endsWith('.css'))
.map((f) => ({ file: join(b.styles, f), source: readFileSync(join(stylesDir, f), 'utf8') }))
: [];
let version = null;
for (const f of ['changelist.txt']) if (existsSync(join(dir, f))) version = readFileSync(join(dir, f), 'utf8').trim();
const changelist = join(dir, 'changelist.txt');
let version = existsSync(changelist) ? readFileSync(changelist, 'utf8').trim() || null : null;
for (const f of files ?? []) {
if (version) break;
try { version = /\bCLSTAMP="(\d+)"/.exec(readFileSync(join(dir, f), 'utf8'))?.[1] ?? null; } catch { /* missing file */ }