Files
egutierrez bf1efb2099 feat: externalize apps/analysis to Gitea repos, add analysis table
- Migration 007: repo_url on apps table + analysis table with FTS5
- Analysis struct, parser, CRUD, validation, hash computation
- Selective purge: remote-only apps/analysis preserved across fn index
- CLI: fn app list/clone/pull, fn analysis list/clone/pull
- search/show/list now include analysis results
- Apps removed from git tracking (content lives in Gitea repos)
- .gitkeep for apps/ and analysis/ dirs
- Bash functions: jupyter analysis pipeline, shell utilities
- Browser domain: CDP functions moved from infra to browser

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 04:23:51 +02:00

30 lines
703 B
Bash

#!/usr/bin/env bash
# exit_with_status — calcula el exit code estandar a partir de contadores de pasos
# exit_with_status <total_steps> <ok_steps> <failed_steps>
#
# Calcula el exit code estandar:
# 0 — todos los pasos exitosos (failed_steps == 0)
# 1 — todos los pasos fallaron (ok_steps == 0)
# 2 — resultado parcial (hay ok y failed)
#
# Imprime el codigo a stdout y sale con ese codigo.
exit_with_status() {
local total_steps="$1"
local ok_steps="$2"
local failed_steps="$3"
local code
if [[ "$failed_steps" -eq 0 ]]; then
code=0
elif [[ "$ok_steps" -eq 0 ]]; then
code=1
else
code=2
fi
echo "$code"
return "$code"
}