Download repo-helper.sh from ummmar/cloudcode: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/spaces/ummmar/cloudcode/resolve/main/repo-helper.sh
- Command line
-
hf download hf://spaces/ummmar/cloudcode/repo-helper.sh
-
curl -L -o repo-helper.sh https://huggingface.co/spaces/ummmar/cloudcode/resolve/main/repo-helper.sh
769 Bytes
| cd /workspace/projects | |
| case "$1" in | |
| clone) | |
| if [ -z "$2" ]; then echo "Usage: repo clone <github-url>"; exit 1; fi | |
| git clone "$2" | |
| echo "Cloned into $(basename "$2" .git)" | |
| ;; | |
| save) | |
| MSG="${2:-Auto-save from OpenCode}" | |
| git add . | |
| git commit -m "$MSG" || echo "Nothing to commit." | |
| git push | |
| echo "Pushed to GitHub." | |
| ;; | |
| new) | |
| if [ -z "$2" ]; then echo "Usage: repo new <folder-name>"; exit 1; fi | |
| mkdir "$2" && cd "$2" | |
| git init | |
| echo "# $2" > README.md | |
| git add . && git commit -m "Initial commit" | |
| echo "Created local repo. Push to GitHub to deploy." | |
| ;; | |
| *) | |
| echo "Usage: repo [clone|save|new]" | |
| ;; | |
| esac |