Henderson_Protocol / hf_sync.sh
3v324v23's picture
πŸš€ Auto-sync update from Termux
c5815ff
#!/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!"