diff --git a/scripts/experiments/isomorphic-git-poc/setup.sh b/scripts/experiments/isomorphic-git-poc/setup.sh new file mode 100644 index 0000000..797a46b --- /dev/null +++ b/scripts/experiments/isomorphic-git-poc/setup.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# isomorphic-git 实验环境初始化 +# 在 /data/guanghulab/repo 下执行 + +cd /data/guanghulab/repo + +# 安装 isomorphic-git +if [ -d node_modules/isomorphic-git ]; then + echo "[OK] isomorphic-git already installed" +else + echo "[INSTALL] isomorphic-git..." + npm install isomorphic-git 2>&1 | tail -3 +fi + +# 确认 .git 目录 +if [ -d .git ]; then + echo "[OK] Git repo: $(pwd)" +else + echo "[FAIL] .git not found" + exit 1 +fi +echo "SETUP_DONE"