chore: add repo zip script
This commit is contained in:
parent
dcafcdd206
commit
427a1f7ea8
18
scripts/zip_agents.sh
Executable file
18
scripts/zip_agents.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# 将项目目录压缩为 zip,排除 Git 元数据。
|
||||||
|
|
||||||
|
SRC="/Users/jojo/Desktop/agents/正在修复中/agents"
|
||||||
|
DEST="/Users/jojo/Desktop/agents/正在修复中/agents.zip"
|
||||||
|
|
||||||
|
cd "$(dirname "$SRC")"
|
||||||
|
dir_name="$(basename "$SRC")"
|
||||||
|
|
||||||
|
# 确保目标文件被覆盖而不是追加
|
||||||
|
rm -f "$DEST"
|
||||||
|
|
||||||
|
zip -r "$DEST" "$dir_name" \
|
||||||
|
-x "$dir_name/.git/*" "$dir_name/.git" "$dir_name/.gitignore" "$dir_name/.gitmodules"
|
||||||
|
|
||||||
|
echo "打包完成: $DEST"
|
||||||
Loading…
Reference in New Issue
Block a user