38 lines
886 B
Bash
38 lines
886 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
# shellcheck source=lib.sh
|
|
. "${SCRIPT_DIR}/lib.sh"
|
|
|
|
qipai_preflight() {
|
|
qipai_print_context
|
|
qipai_check_arch
|
|
qipai_command_status git
|
|
qipai_command_status bash
|
|
qipai_command_status node
|
|
qipai_command_status npm
|
|
qipai_command_status mysql
|
|
qipai_command_status nginx
|
|
qipai_command_status pm2
|
|
qipai_command_status openssl
|
|
qipai_command_status curl
|
|
|
|
if command -v docker >/dev/null 2>&1; then
|
|
qipai_warn "docker detected but this project does not use Docker"
|
|
else
|
|
qipai_pass "docker: not installed or not in PATH"
|
|
fi
|
|
|
|
if command -v redis-server >/dev/null 2>&1; then
|
|
qipai_warn "redis-server detected; Redis is reserved/disabled for MVP"
|
|
else
|
|
qipai_pass "redis: RESERVED/DISABLED"
|
|
fi
|
|
}
|
|
|
|
if [ "${1:-}" = "--run" ]; then
|
|
qipai_preflight
|
|
fi
|
|
|