mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
25 lines
456 B
Bash
25 lines
456 B
Bash
#!/usr/bin/env bash
|
|
|
|
extract_openclaw_semver() {
|
|
local raw="${1:-}"
|
|
local parsed=""
|
|
parsed="$(
|
|
printf '%s\n' "$raw" \
|
|
| tr -d '\r' \
|
|
| grep -Eo 'v?[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z]+(\.[0-9A-Za-z]+)*)?(\+[0-9A-Za-z.-]+)?' \
|
|
| head -n 1 \
|
|
|| true
|
|
)"
|
|
printf '%s' "${parsed#v}"
|
|
}
|
|
|
|
quiet_npm() {
|
|
npm \
|
|
--loglevel=error \
|
|
--no-update-notifier \
|
|
--no-fund \
|
|
--no-audit \
|
|
--no-progress \
|
|
"$@"
|
|
}
|