mydoc 213 B

123456789101112
  1. #!/bin/bash
  2. cd doc/
  3. # 检查 http-server 是否已安装
  4. if ! command -v http-server &> /dev/null; then
  5. echo "正在安装 http-server..."
  6. npm install -g http-server
  7. fi
  8. # 启动 http-server
  9. http-server