修:draw-ui / oil-motion 原被当子模块指针收录 ⇒ 改为正常文件入库(两份内容原先对别人是空的)
一、问题(本轮实测)
`draw-ui` 与 `oil-motion` 目录里**各自带一个内嵌 `.git`** ⇒ 上一次提交把它们记成了 **gitlink(子模块指针)**
⇒ 仓库里只存了一个不属于任何远端的 commit id,**别人克隆下来这两份是空的** ✗(`git status` 显示 ` m draw-ui` / ` m oil-motion` = 子模块内容有改动)。
二、处置(可回退)
· 把两处的 `.git` **挪走**(⛔ 不是删除)⇒ `归档/内嵌git-20261008/{draw-ui,oil-motion}.git`;
· `git rm --cached` 掉那两个 gitlink,再 `git add` 两个目录 ⇒ **按正常文件入库**(内容才真的进仓库)。
三、副作用(如实记)
挪走 `.git` 后,这两个技能**不能再原地 `git pull` 取上游更新**(要更新得重新拉一份覆盖);
如需恢复其本地仓库,把 `归档/内嵌git-20261008/` 里的 `.git` 挪回原处即可。
This commit is contained in:
1 parent
e03465c398
commit
237a09a5b0
161 files changed
+19429
-2
No files matched your search
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
VENV_DIR="${DRAW_VENV:-$HOME/.cache/draw/venv}"
|
||||
PROVIDER="${DRAW_PROVIDER:-zenmux}"
|
||||
RAW_ARGS=("$@")
|
||||
for ((i = 0; i < ${#RAW_ARGS[@]}; i++)); do
|
||||
case "${RAW_ARGS[$i]}" in
|
||||
--provider)
|
||||
if [[ $((i + 1)) -ge ${#RAW_ARGS[@]} ]]; then
|
||||
echo "[ERROR] --provider requires zenmux or codex." >&2
|
||||
exit 2
|
||||
fi
|
||||
PROVIDER="${RAW_ARGS[$((i + 1))]}"
|
||||
((i += 1))
|
||||
;;
|
||||
--provider=*)
|
||||
PROVIDER="${RAW_ARGS[$i]#--provider=}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$PROVIDER" in
|
||||
codex)
|
||||
PYTHON_BIN="${DRAW_PYTHON:-python3}"
|
||||
;;
|
||||
zenmux)
|
||||
PYTHON_BIN="${DRAW_PYTHON:-$VENV_DIR/bin/python3}"
|
||||
if [[ ! -x "$PYTHON_BIN" ]]; then
|
||||
mkdir -p "$VENV_DIR"
|
||||
python3 -m venv "$VENV_DIR"
|
||||
fi
|
||||
|
||||
if ! "$PYTHON_BIN" -c "import google.genai, PIL" >/dev/null 2>&1; then
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 "$PYTHON_BIN" -m pip install --quiet --upgrade pip google-genai pillow
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Invalid provider '$PROVIDER'; expected zenmux or codex." >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
# --frame <path>: prepend a frame reference image before all other --ref args.
|
||||
# Usage: ask_draw.sh --frame /path/to/frame.png [other args...]
|
||||
# This injects --ref <frame> at the front so the frame is always ref[0].
|
||||
FRAME_PATH=""
|
||||
REMAINING_ARGS=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--frame)
|
||||
FRAME_PATH="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
REMAINING_ARGS+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -n "$FRAME_PATH" ]]; then
|
||||
exec "$PYTHON_BIN" "$SCRIPT_DIR/generate_image.py" --ref "$FRAME_PATH" "${REMAINING_ARGS[@]}"
|
||||
else
|
||||
exec "$PYTHON_BIN" "$SCRIPT_DIR/generate_image.py" "${REMAINING_ARGS[@]}"
|
||||
fi
|
||||
Reference in new issue
Block a user