Files
Leantime/.dev/remote-deploy/42_dl_handsontable.sh

21 lines
1014 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
set -u
cd /var/www/onebot
DIR=public/dist/handsontable
mkdir -p "$DIR"
BASE="https://cdn.jsdelivr.net/npm/handsontable@14.6.2/dist"
echo "=== 下载 Handsontable 14.6.2 ==="
curl -s -m 60 -o "$DIR/handsontable.full.min.js" "$BASE/handsontable.full.min.js" && echo "js ok $(wc -c < "$DIR/handsontable.full.min.js") bytes"
curl -s -m 60 -o "$DIR/handsontable.full.min.css" "$BASE/handsontable.full.min.css" && echo "css ok $(wc -c < "$DIR/handsontable.full.min.css") bytes"
echo ""
echo "=== 校验js 应有 Handsontable 关键字css 应有 .handsontable ==="
head -c 60 "$DIR/handsontable.full.min.js"; echo ""
grep -c "handsontable" "$DIR/handsontable.full.min.css" 2>/dev/null || echo "css 校验失败"
echo ""
echo "=== 通过 web 验证可访问 ==="
curl -s -o /dev/null -w "js HTTP=%{http_code}\n" "http://127.0.0.1:8081/dist/handsontable/handsontable.full.min.js"
curl -s -o /dev/null -w "css HTTP=%{http_code}\n" "http://127.0.0.1:8081/dist/handsontable/handsontable.full.min.css"