From acb9c0b90393e007623a3f1e06c14e72ec3a1f62 Mon Sep 17 00:00:00 2001 From: hhhjin Date: Wed, 18 Mar 2026 14:00:25 +0900 Subject: [PATCH] fix: support more awk variants in install script --- .changeset/tidy-buses-smash.md | 5 +++++ scripts/install.sh | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 .changeset/tidy-buses-smash.md diff --git a/.changeset/tidy-buses-smash.md b/.changeset/tidy-buses-smash.md new file mode 100644 index 0000000..d1bed62 --- /dev/null +++ b/.changeset/tidy-buses-smash.md @@ -0,0 +1,5 @@ +--- +"@syncdown/cli": patch +--- + +Fix the install script failing on some awk implementations when resolving the latest CLI release tag. diff --git a/scripts/install.sh b/scripts/install.sh index 2f4f3e3..952ddd4 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -42,12 +42,10 @@ resolve_tag() { minor = parts[2] + 0 patch = parts[3] + 0 - if ( - best == "" || - major > best_major || - (major == best_major && minor > best_minor) || - (major == best_major && minor == best_minor && patch > best_patch) - ) { + if (best == "" || + major > best_major || + (major == best_major && minor > best_minor) || + (major == best_major && minor == best_minor && patch > best_patch)) { best = $0 best_major = major best_minor = minor