23 lines
460 B
Bash

#!/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"