browser4-cli 4.12.0-rc.3 → 4.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -15
- package/bin/browser4-cli-darwin-arm64 +0 -0
- package/bin/browser4-cli-darwin-x64 +0 -0
- package/bin/browser4-cli-linux-arm64 +0 -0
- package/bin/browser4-cli-linux-musl-arm64 +0 -0
- package/bin/browser4-cli-linux-musl-x64 +0 -0
- package/bin/browser4-cli-linux-x64 +0 -0
- package/bin/browser4-cli-win32-x64.exe +0 -0
- package/package.json +1 -1
- package/scripts/build-all-platforms.ps1 +104 -104
- package/scripts/enumerate-help.ps1 +382 -382
- package/scripts/install-browser4-cli.ps1 +812 -750
- package/scripts/install-browser4-cli.sh +31 -8
- package/scripts/tests/install-browser4-cli.tests.ps1 +476 -311
- package/scripts/tests/install-browser4-cli.tests.sh +135 -0
|
@@ -497,25 +497,48 @@ create_symlinks() {
|
|
|
497
497
|
ok "Created symlink: ${link_name} -> ${binary_name}"
|
|
498
498
|
fi
|
|
499
499
|
|
|
500
|
-
# 2)
|
|
500
|
+
# 2) b4 -> browser4-cli-<platform> (only if b4 is our tool or doesn't exist)
|
|
501
501
|
local short_name="b4${ext}"
|
|
502
502
|
local short_path="${install_dir}/${short_name}"
|
|
503
503
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
return
|
|
507
|
-
fi
|
|
504
|
+
local b4_exists=false
|
|
505
|
+
local b4_is_ours=false
|
|
508
506
|
|
|
507
|
+
# Check in install dir first — anything here is ours
|
|
509
508
|
if [[ -e "$short_path" ]] || [[ -L "$short_path" ]]; then
|
|
510
|
-
|
|
509
|
+
b4_exists=true
|
|
510
|
+
b4_is_ours=true
|
|
511
|
+
fi
|
|
512
|
+
|
|
513
|
+
# Check if b4 is on PATH from somewhere else
|
|
514
|
+
if [[ "$b4_exists" != true ]]; then
|
|
515
|
+
if command -v b4 >/dev/null 2>&1; then
|
|
516
|
+
b4_exists=true
|
|
517
|
+
# Check if it's ours by running --version
|
|
518
|
+
if b4 --version 2>&1 | grep -qi "browser4-cli"; then
|
|
519
|
+
b4_is_ours=true
|
|
520
|
+
fi
|
|
521
|
+
fi
|
|
522
|
+
fi
|
|
523
|
+
|
|
524
|
+
if [[ "$b4_exists" == true ]] && [[ "$b4_is_ours" != true ]]; then
|
|
525
|
+
warn "Skipping short link '${short_name}': 'b4' is not browser4-cli"
|
|
511
526
|
return
|
|
512
527
|
fi
|
|
513
528
|
|
|
514
529
|
if [[ "$DRY_RUN" == true ]]; then
|
|
515
|
-
|
|
530
|
+
if [[ "$b4_exists" == true ]]; then
|
|
531
|
+
step "[DRY-RUN] Would update symlink: ${short_name} -> ${binary_name}"
|
|
532
|
+
else
|
|
533
|
+
step "[DRY-RUN] Would create symlink: ${short_name} -> ${binary_name}"
|
|
534
|
+
fi
|
|
516
535
|
else
|
|
517
536
|
ln -sf "$binary_name" "$short_path"
|
|
518
|
-
|
|
537
|
+
if [[ "$b4_exists" == true ]]; then
|
|
538
|
+
ok "Updated symlink: ${short_name} -> ${binary_name}"
|
|
539
|
+
else
|
|
540
|
+
ok "Created symlink: ${short_name} -> ${binary_name}"
|
|
541
|
+
fi
|
|
519
542
|
fi
|
|
520
543
|
}
|
|
521
544
|
|