-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·46 lines (37 loc) · 1.42 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·46 lines (37 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
# Instala el pack de migración Angular en un repo destino.
# Uso: ./install.sh /ruta/al/repo-angular
set -euo pipefail
SRC="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEST="${1:-}"
[ -z "$DEST" ] && { echo "Uso: ./install.sh /ruta/al/repo-angular"; exit 1; }
[ -d "$DEST" ] || { echo "No existe: $DEST"; exit 1; }
mkdir -p "$DEST/.github/prompts" "$DEST/.github/instructions" \
"$DEST/docs/angular-upgrade" "$DEST/scripts"
copy() {
if [ -e "$2" ]; then
echo " ~ ya existe, no piso: ${2#$DEST/}"
else
cp "$1" "$2"; echo " + ${2#$DEST/}"
fi
}
echo "Instalando en $DEST"
for f in "$SRC"/.github/prompts/*.prompt.md; do
copy "$f" "$DEST/.github/prompts/$(basename "$f")"
done
for f in "$SRC"/.github/instructions/*.instructions.md; do
copy "$f" "$DEST/.github/instructions/$(basename "$f")"
done
for f in "$SRC"/docs/*.md; do
copy "$f" "$DEST/docs/angular-upgrade/$(basename "$f")"
done
copy "$SRC/scripts/angular-upgrade-audit.sh" "$DEST/scripts/angular-upgrade-audit.sh"
chmod +x "$DEST/scripts/angular-upgrade-audit.sh" 2>/dev/null || true
cat <<'MSG'
Listo. Siguiente paso en el repo destino:
1. ./scripts/angular-upgrade-audit.sh
2. En Copilot Chat: /angular-upgrade-plan
3. Revisá MIGRATION-PLAN.md a mano antes de ejecutar ningún salto.
4. Por cada salto: /angular-upgrade-hop → /angular-upgrade-verify
Nada se instala en node_modules ni toca el código de la app.
MSG