Files
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +02:00

2.2 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path, source_repo, source_license, source_file
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path source_repo source_license source_file
bash_check_deps function bash shell 1.0.0 impure check_command(cmd: string, [error_code: string], [description: string]) -> void; check_commands(cmd...: string) -> void; check_directory(dir: string, [msg: string]) -> void; check_file(file: string, [msg: string]) -> void Verifica existencia de comandos, directorios y archivos con output formateado. Complementa assert_command_exists con mensajes de error detallados y logging.
bash
check
dependency
command
exists
validation
pendiente-usar
bash_log_bash_shell
false error_go_core
name desc
cmd nombre del comando a verificar en PATH
name desc
error_code codigo identificador del error; default COMMAND_NOT_FOUND
name desc
description mensaje de error personalizado; default 'El comando CMD no esta disponible'
name desc
dir ruta del directorio a verificar
name desc
file ruta del archivo a verificar
exit code 0 si todas las verificaciones pasan; exit code 1 en caso de fallo con mensaje de error formateado false
bash/functions/shell/bash_check_deps.sh https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git MIT scripts/lib/common.sh

Ejemplo

source bash/functions/shell/bash_check_deps.sh

check_command "docker" "DOCKER_NOT_FOUND" "Docker no esta instalado"
check_commands "git" "curl" "jq"
check_directory "/var/data" "El directorio de datos no existe"
check_file "/etc/config.yaml" "Falta el archivo de configuracion"

Notas

check_command acepta un error_code y descripcion opcionales para mensajes mas descriptivos que assert_command_exists. Usa debug internamente para loggear cada verificacion.

check_commands verifica multiples comandos en una sola llamada y reporta todos los faltantes antes de retornar 1.

Sourcea bash_log.sh automaticamente, que a su vez sourcea bash_colors.sh. No es necesario sourcea dependencias por separado.