File size: 1,080 Bytes
c5815ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/data/data/com.termux/files/usr/bin/bash
# 🔗 Hugging Face Sync Script for Henderson Protocol
# Make sure you have your HF token before running (see below)

echo "🌐 Syncing Henderson Protocol with Hugging Face Space..."

# 1️⃣ Verify token
if [ -z "$HF_TOKEN" ]; then
  echo "⚠️  Hugging Face token not found."
  echo "➡️  Run: export HF_TOKEN='your_token_here'"
  echo "Then rerun this script."
  exit 1
fi

# 2️⃣ Configure git
git config --global user.email "you@example.com"
git config --global user.name "Henderson Protocol"

# 3️⃣ Initialize repo if not exists
cd ~/henderson_space || exit
if [ ! -d ".git" ]; then
  echo "📦 Initializing Git repository..."
  git init
  git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME
fi

# 4️⃣ Add, commit, and push
git add .
git commit -m "🚀 Auto-sync update from Termux"
git branch -M main
git push https://$HF_TOKEN@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME main --force

echo "✅ Sync complete. Your Henderson Protocol is now live on Hugging Face Space!"