54 lines
No EOL
2.7 KiB
Bash
Executable file
54 lines
No EOL
2.7 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
BASE="https://paiol.idz.one/desenvolvimento/agent-ia"
|
|
ERROS=0
|
|
|
|
baixar() {
|
|
echo "baixando $1"
|
|
ERRO_CURL="$(curl -sSfL --create-dirs "$1" -o "$2" 2>&1)" || {
|
|
echo " ⚠ $1"
|
|
echo " $ERRO_CURL"
|
|
ERROS=$((ERROS + 1))
|
|
return 1
|
|
}
|
|
}
|
|
|
|
# ignorar se não auto atualizar
|
|
if [ "$NAO_AUTO_ATUALIZAR" != "1" ]; then
|
|
# atualizar-agente.global.sh
|
|
if baixar "$BASE/atualizar-agente.global.sh" "$DIR/atualizar-agente.global.sh"; then
|
|
NAO_AUTO_ATUALIZAR=1 sh "$DIR/atualizar-agente.global.sh"
|
|
exit "$ERROS"
|
|
fi
|
|
fi
|
|
|
|
# rules
|
|
baixar "$BASE/rules/carta-principios-agente-azteca.global.md" "$DIR/rules/carta-principios-agente-azteca.global.md"
|
|
baixar "$BASE/rules/escrita-natural.global.md" "$DIR/rules/escrita-natural.global.md"
|
|
baixar "$BASE/rules/typescript-sem-any.global.md" "$DIR/rules/typescript-sem-any.global.md"
|
|
baixar "$BASE/rules/regras_negocio_md.global.md" "$DIR/rules/regras_negocio_md.global.md"
|
|
|
|
# workflows
|
|
baixar "$BASE/workflows/aprimorar-IA.global.md" "$DIR/workflows/aprimorar-IA.global.md"
|
|
baixar "$BASE/workflows/adicionar-ajuda.global.md" "$DIR/workflows/adicionar-ajuda.global.md"
|
|
baixar "$BASE/workflows/atualizar-agente.global.md" "$DIR/workflows/atualizar-agente.global.md"
|
|
baixar "$BASE/workflows/criar-fluxograma.global.md" "$DIR/workflows/criar-fluxograma.global.md"
|
|
baixar "$BASE/workflows/documentar-codigo.global.md" "$DIR/workflows/documentar-codigo.global.md"
|
|
baixar "$BASE/workflows/comercial.global.md" "$DIR/workflows/comercial.global.md"
|
|
baixar "$BASE/workflows/marketing.global.md" "$DIR/workflows/marketing.global.md"
|
|
baixar "$BASE/workflows/orcamento.global.md" "$DIR/workflows/orcamento.global.md"
|
|
baixar "$BASE/workflows/reels.global.md" "$DIR/workflows/reels.global.md"
|
|
baixar "$BASE/workflows/documentar-regras-negocio.global.md" "$DIR/workflows/documentar-regras-negocio.global.md"
|
|
|
|
|
|
# skills
|
|
baixar "$BASE/skills/mapear-codigo-fonte.global/SKILL.md" "$DIR/skills/mapear-codigo-fonte.global/SKILL.md"
|
|
baixar "$BASE/skills/diagnosticar-erros-build.global/SKILL.md" "$DIR/skills/diagnosticar-erros-build.global/SKILL.md"
|
|
baixar "$BASE/skills/documentar-decisao-tecnica.global/SKILL.md" "$DIR/skills/documentar-decisao-tecnica.global/SKILL.md"
|
|
baixar "$BASE/skills/documentar-regras-negocio.global/SKILL.md" "$DIR/skills/documentar-regras-negocio.global/SKILL.md"
|
|
|
|
# raiz (.agent)
|
|
baixar "$BASE/tools.md" "$DIR/tools.md"
|
|
|
|
exit "$ERROS" |