#!/bin/bash set -e TOKEN_FILE="$(dirname "$0")/.hf_token" if [ ! -f "$TOKEN_FILE" ]; then echo "Error: $TOKEN_FILE not found"; exit 1 fi TOKEN=$(cat "$TOKEN_FILE" | tr -d '[:space:]') if [ -z "$TOKEN" ] || [ "$TOKEN" = "PASTE_YOUR_HF_TOKEN_HERE" ]; then echo "Error: fill in your HF token in .hf_token first"; exit 1 fi git remote set-url hf "https://dennischan0909:$TOKEN@huggingface.co/spaces/dennischan0909/dockerspace" git push hf dev-main:main git remote set-url hf "https://huggingface.co/spaces/dennischan0909/dockerspace" echo "Done — HF Space rebuild triggered."