[ADDED] Script instalador para forgejo-cli y política de autoría

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mauro Rosero P. 2025-03-14 09:46:00 -05:00
parent ebdb28bb93
commit b90f8b33df
Signed by: mrosero
GPG key ID: 83BD2A5F674B7E26
2 changed files with 92 additions and 0 deletions

33
CLAUDE.md Normal file
View file

@ -0,0 +1,33 @@
# MRDevs Tools Development Guide
## Build & Installation Commands
- `bin/bootstrap.sh` - Install basic tools and container management
- `bin/update.sh` - Update development environment
- `bin/cortana_install.sh` - Install Claude Code CLI
- `bin/cortana_install.sh -u` - Uninstall Claude Code CLI
## Code Style Guidelines
- **Shell Scripts**:
- Add license header with copyright info (AGPL)
- Include Modified date in comments
- Use functions for modularity
- Follow consistent variable naming (`UPPERCASE` for constants)
- Document function purpose with comments
- Include usage examples in script headers
- Handle errors with proper exit codes
## Development Practices
- Use `bin/lib/base.lib` for common functions
- Message files stored in `bin/msg/` (multilingual support)
- Configuration in `bin/config/` directory
- Use git commit messages with prefixes: [ADDED], [IMPROVED], [FIXED], [SOPS]
- Prefer podman over docker for container management
## Authorship Policy
- For new projects created by Claude Code, use author: "Cortana Rosero One <cortana@rosero.one>"
- Include reference indicating generation by Claude Code and the version used
- Example header comment:
```
# [Author] Cortana Rosero One <cortana@rosero.one>
# [Generated] Created by Claude Code (claude-3-7-sonnet-20250219)
```

59
fjcli_install.sh Executable file
View file

@ -0,0 +1,59 @@
#!/bin/bash
# ------------------------------------------------------------------
# [Author] Cortana Rosero One <cortana@rosero.one>
# [Title] fjcli_install.sh - Instalador de forgejo-cli
# [Generated] Created by Claude Code (claude-3-7-sonnet-20250219)
#
# AGPL License
# Modified date: 14/03/2025
# ------------------------------------------------------------------
# Función para verificar si cargo está instalado
check_cargo() {
if ! command -v cargo &> /dev/null; then
echo "Cargo no está instalado. Instalando Rust y Cargo..."
curl https://sh.rustup.rs -sSf | sh
source "$HOME/.cargo/env"
echo "Rust y Cargo han sido instalados correctamente."
else
echo "Cargo ya está instalado."
fi
}
# Función para verificar si codeberg-cli está instalado
check_codeberg_cli() {
if ! command -v codeberg &> /dev/null; then
echo "codeberg-cli no está instalado. Instalando..."
# Verificar que cargo esté disponible
if ! command -v cargo &> /dev/null; then
echo "ERROR: No se pudo encontrar cargo en el PATH después de la instalación."
echo "Por favor reinicie su terminal e intente nuevamente."
exit 1
fi
# Instalar codeberg-cli
cargo install codeberg-cli
if [ $? -eq 0 ]; then
echo "codeberg-cli instalado correctamente."
else
echo "ERROR: No se pudo instalar codeberg-cli."
exit 1
fi
else
echo "codeberg-cli ya está instalado."
fi
}
# Verificar si cargo está instalado
check_cargo
echo "Preparando instalación de forgejo-cli..."
# Instalar codeberg-cli si no está instalado
check_codeberg_cli
echo "Instalación completada."
exit 0