mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
fix: fill takes values literally; the notifier path is quoted in its unit
This commit is contained in:
1 parent
ca500c995f
commit
7381b62af9
3 files changed
+11
-6
No files matched your search
+2
-1
@@ -7,7 +7,8 @@ one per merged pull request.
|
|||||||
|
|
||||||
## 2.5.0 - 2026-09-27
|
## 2.5.0 - 2026-09-27
|
||||||
|
|
||||||
- **refactor: DKMS confs in patches/; an existing leds-valve DKMS override is kept and restored**
|
- **fix: fill takes values literally; the notifier path is quoted in its unit**
|
||||||
|
- `cce31e1` **refactor: DKMS confs in patches/; an existing leds-valve DKMS override is kept and restored**
|
||||||
- `bd4fa3a` **refactor: The session sync and kernel headers scripts in patches/**
|
- `bd4fa3a` **refactor: The session sync and kernel headers scripts in patches/**
|
||||||
- `8ffa0f2` **refactor: systemd units in services/, read with service_file like patches/**
|
- `8ffa0f2` **refactor: systemd units in services/, read with service_file like patches/**
|
||||||
- `8a2601d` **docs: README screenshot at 2.5.0 with Update notifications; AGENTS.md: retake it when rows change**
|
- `8a2601d` **docs: README screenshot at 2.5.0 with Update notifications; AGENTS.md: retake it when rows change**
|
||||||
|
|||||||
+7
-4
@@ -13,12 +13,15 @@ patch_file() { cat "$SCRIPT_DIR/patches/$1"; }
|
|||||||
# in. The single-file build replaces service_raw like patch_file.
|
# in. The single-file build replaces service_raw like patch_file.
|
||||||
service_raw() { cat "$SCRIPT_DIR/services/$1"; }
|
service_raw() { cat "$SCRIPT_DIR/services/$1"; }
|
||||||
service_file() { local name="$1"; shift; service_raw "$name" | fill "$@"; }
|
service_file() { local name="$1"; shift; service_raw "$name" | fill "$@"; }
|
||||||
# fill [KEY=value...]: stdin with each @KEY@ replaced by its value (paths,
|
# fill [KEY=value...]: stdin with each @KEY@ replaced by its value, taken
|
||||||
# names; no "|" in them).
|
# literally (a home folder may contain sed's "&", "\" or "|").
|
||||||
fill() {
|
fill() {
|
||||||
local kv
|
local kv v
|
||||||
local -a subst=(-e '')
|
local -a subst=(-e '')
|
||||||
for kv in "$@"; do subst+=(-e "s|@${kv%%=*}@|${kv#*=}|g"); done
|
for kv in "$@"; do
|
||||||
|
v="${kv#*=}"; v="${v//\\/\\\\}"; v="${v//&/\\&}"; v="${v//|/\\|}"
|
||||||
|
subst+=(-e "s|@${kv%%=*}@|$v|g")
|
||||||
|
done
|
||||||
sed "${subst[@]}"
|
sed "${subst[@]}"
|
||||||
}
|
}
|
||||||
warn() { echo -e "${c_yellow}[WARN]${c_reset} $*"; }
|
warn() { echo -e "${c_yellow}[WARN]${c_reset} $*"; }
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ PartOf=graphical-session.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
# The short wait at login lets the tray come up first (in the script: an
|
# The short wait at login lets the tray come up first (in the script: an
|
||||||
# ExecStartPre sleep runs into the start timeout).
|
# ExecStartPre sleep runs into the start timeout).
|
||||||
ExecStart=@NOTIFY_SCRIPT@ --delay 60
|
# Quoted: the path is in the home folder, which may contain a space.
|
||||||
|
ExecStart="@NOTIFY_SCRIPT@" --delay 60
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=plasma-workspace.target
|
WantedBy=plasma-workspace.target
|
||||||
Reference in new issue
Block a user