|
Server IP : 149.13.87.7 / Your IP : 185.174.145.2 Web Server : nginx System : Linux h2 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 User : root ( 0) PHP Version : 8.0.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /var/www/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
#!/bin/bash
# =====================================================
# STEP 0 — Run this ONCE on your server
# Downloads all themes to a shared cache
# so build_mass_v3.py can use them without git
# =====================================================
THEMES_CACHE="/var/www/_themes_cache"
mkdir -p "$THEMES_CACHE"
echo "Installing git if needed..."
yum install -y git 2>/dev/null | tail -1
declare -A THEMES=(
["papermod"]="https://github.com/adityatelange/hugo-PaperMod"
["ananke"]="https://github.com/theNewDynamic/gohugo-theme-ananke"
["terminal"]="https://github.com/panr/hugo-theme-terminal"
["hello-friend-ng"]="https://github.com/rhazdon/hugo-theme-hello-friend-ng"
["coder"]="https://github.com/luizdepra/hugo-coder"
["archie"]="https://github.com/athul/archie"
["paper"]="https://github.com/nanxiaobei/hugo-paper"
["mainroad"]="https://github.com/Vimux/Mainroad"
["beautiful-hugo"]="https://github.com/halogenica/beautifulhugo"
["mini"]="https://github.com/nodejh/hugo-theme-mini"
["monochrome"]="https://github.com/kaiiiz/hugo-theme-monochrome"
["ficurinia"]="https://gitlab.com/gabmus/hugo-ficurinia"
)
OK=0
FAIL=0
for THEME in "${!THEMES[@]}"; do
DEST="$THEMES_CACHE/$THEME"
URL="${THEMES[$THEME]}"
if [ -d "$DEST/.git" ]; then
echo " ✓ $THEME already cached"
OK=$((OK+1))
continue
fi
echo " → Cloning $THEME..."
if git clone --depth=1 "$URL" "$DEST" 2>/dev/null; then
echo " ✅ $THEME"
OK=$((OK+1))
else
echo " ✗ $THEME FAILED"
FAIL=$((FAIL+1))
fi
done
echo ""
echo "Done: $OK cached, $FAIL failed"
echo "Cache: $THEMES_CACHE"
ls "$THEMES_CACHE"
AnonSec - 2021