-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
37 lines (28 loc) · 982 Bytes
/
Copy pathinstall.sh
File metadata and controls
37 lines (28 loc) · 982 Bytes
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
#!/bin/bash
# Verificar Node.js
if ! command -v node &> /dev/null
then
echo "❌ Node.js no está instalado. Instálalo antes de continuar."
exit 1
fi
NODE_VERSION=$(node -v | cut -d "v" -f2 | cut -d "." -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "❌ Se requiere Node.js 18 o superior. Tu versión actual es $(node -v)"
exit 1
fi
# Instalar librsvg2-bin
sudo apt-get update
sudo apt-get install -y librsvg2-bin
# Preparar carpeta
mkdir -p ~/.cv-creator
# Descargar archivos
curl -L https://raw.githubusercontent.com/Gabrielito666/cv-creator/main/bundle.js -o ~/.cv-creator/index.js
curl -L https://raw.githubusercontent.com/Gabrielito666/cv-creator/main/package.json -o ~/.cv-creator/package.json
# Instalar dependencias
cd ~/.cv-creator
npm install --omit=dev
# Agregar alias
echo 'alias cv-creator="node ~/.cv-creator/index.js"' >> ~/.bashrc
source ~/.bashrc
echo "✅ cv-creator instalado correctamente. Usa 'cv-creator archivo.cvml salida.pdf'"
cd ~