Skip to content

PasteFerry (隔空贴): clipboard and file sync across macOS, Windows and Linux. Direct-first, end-to-end encrypted. Optional official access: no server to host. Independent self-hosting remains available.

fix(tools): brace shell variables followed by CJK text

baiyuzec3fb99e3ceb9
diff --git a/scripts/gitee-mirror.sh b/scripts/gitee-mirror.sh
index 3854cb3..d3e89dd 100755
--- a/scripts/gitee-mirror.sh
+++ b/scripts/gitee-mirror.sh
@@ -51,7 +51,7 @@ trap 'rm -f "$ASKPASS"' EXIT
printf '#!/bin/sh\ncase "$1" in Username*) echo %s ;; *) security find-generic-password -s pasteferry-gitee-token -w ;; esac\n' "$OWNER" >"$ASKPASS"
chmod 700 "$ASKPASS"
# 推的是本地记录的 origin/main(先 git fetch),而不是本地 main,免得带上还没推到 GitHub 的提交
-git merge-base --is-ancestor "$TAG" refs/remotes/origin/main || { echo "origin/main 里没有 $TAG,先 git fetch" >&2; exit 1; }
+git merge-base --is-ancestor "$TAG" refs/remotes/origin/main || { echo "origin/main 里没有 ${TAG},先 git fetch" >&2; exit 1; }
GIT_ASKPASS=$ASKPASS GIT_TERMINAL_PROMPT=0 git push -q "https://gitee.com/$OWNER/$REPO.git" \
refs/remotes/origin/main:refs/heads/main 'refs/tags/*:refs/tags/*'
diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh
index c57f401..3bd9412 100755
--- a/scripts/install-macos.sh
+++ b/scripts/install-macos.sh
@@ -20,7 +20,7 @@ LABEL="com.pasteferry.daemon"
PLIST="$HOME/Library/LaunchAgents/$LABEL.plist"
LOG_DIR="$HOME/Library/Logs/PasteFerry"
-[[ -d "$APP_SRC" ]] || { echo "找不到 $APP_SRC,请先运行 ./scripts/build.sh"; exit 1; }
+[[ -d "$APP_SRC" ]] || { echo "找不到 ${APP_SRC},请先运行 ./scripts/build.sh"; exit 1; }
echo "▶ 停止已在运行的实例"
launchctl bootout "gui/$(id -u)/$LABEL" 2>/dev/null || true
diff --git a/scripts/package-linux.sh b/scripts/package-linux.sh
index d542bbe..c4691b8 100755
--- a/scripts/package-linux.sh
+++ b/scripts/package-linux.sh
@@ -31,7 +31,7 @@ OUT=dist/linux
APP=$OUT/PasteFerry
rm -rf "$OUT" && mkdir -p "$APP"
-echo "▶ 后台服务与命令行($VERSION,$ARCH)"
+echo "▶ 后台服务与命令行(${VERSION},${ARCH})"
# 纯 Go,不依赖 glibc 版本:剪贴板经 X11 协议直接通信,不链接 libX11
(cd client-core && CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION" \
-o "../$APP/pasteferryd" ./cmd/pasteferryd)
diff --git a/tools/natlab/docker.sh b/tools/natlab/docker.sh
index 5e9678c..66a56a2 100755
--- a/tools/natlab/docker.sh
+++ b/tools/natlab/docker.sh
@@ -13,7 +13,7 @@ OUT=$(mktemp -d)
trap 'rm -rf "$OUT"' EXIT
ARCH=$(docker version --format '{{.Server.Arch}}')
-echo "▶ 编译 natlab(linux/$ARCH)"
+echo "▶ 编译 natlab(linux/${ARCH})"
(cd client-core && CGO_ENABLED=0 GOOS=linux GOARCH=$ARCH go build -o "$OUT/natlab" ./cmd/natlab)
echo "▶ 准备实验室镜像"
diff --git a/tools/natlab/run.sh b/tools/natlab/run.sh
index c676c65..3739aa5 100755
--- a/tools/natlab/run.sh
+++ b/tools/natlab/run.sh
@@ -323,5 +323,5 @@ check_lan "两个网段,两台都挡入站,一边记得" routed offline "-ad
check_lan "两个网段之间被隔离" isolated offline "-addr $B" "-addr $A"
echo
-echo "通过 $PASS,失败 $FAIL"
+echo "通过 ${PASS},失败 $FAIL"
[[ $FAIL -eq 0 ]]
diff --git a/tools/screenshots/render.sh b/tools/screenshots/render.sh
index debd99a..954092a 100755
--- a/tools/screenshots/render.sh
+++ b/tools/screenshots/render.sh
@@ -20,11 +20,11 @@ for lang in zh zh-tw zh-hk en ja; do
out=docs/assets/screenshots
[ "$lang" = zh ] || out="$out/$lang"
- echo "▶ 渲染界面($lang)"
+ echo "▶ 渲染界面(${lang})"
rm -rf ui/tool/screenshots/out
(cd ui && SCREENSHOT_FONTS="$FONTS" SCREENSHOT_LANG="$lang" flutter test tool/screenshots/screenshots_test.dart 2>&1 | tail -1)
- echo "▶ 加窗口外框($lang)"
+ echo "▶ 加窗口外框(${lang})"
mkdir -p "$out"
swift tools/screenshots/frame.swift ui/tool/screenshots/out "$out"
done