setup-kapelu 3.0.3 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -68,11 +68,23 @@ try {
68
68
  console.log("🚀 Ejecutando install.sh\n");
69
69
  execSync(`bash ${__dirname}/install.sh`, { stdio: "inherit" });
70
70
  } catch (err) {
71
- clear
72
- console.log("");
73
- console.error(" \n❌ Error ejecutando Post-Install:", err.message);
74
- console.log("");
75
- console.log("");
71
+ console.clear();
72
+
73
+ console.error("\n❌ Error ejecutando Post-Install\n");
74
+
75
+ if (err.status) {
76
+ console.error("Código de salida:", err.status);
77
+ }
78
+
79
+ if (err.cmd) {
80
+ console.error("Comando:", err.cmd);
81
+ }
82
+
83
+ if (err.stderr) {
84
+ console.error(err.stderr.toString());
85
+ }
86
+
87
+ console.error(err.message);
76
88
 
77
89
  process.exit(1);
78
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "setup-kapelu",
3
- "version": "3.0.3",
3
+ "version": "3.2.1",
4
4
  "description": "Script post-install de Ubuntu",
5
5
  "type": "commonjs",
6
6
  "bin": {
package/script/setup.sh CHANGED
@@ -148,10 +148,12 @@ fi
148
148
 
149
149
  system_update() {
150
150
  clear
151
- echo -e "${COLOR[green]}🔄 Actualizando sistema${COLOR[reset]}"
151
+ echo -e " ${COLOR[green]}🔄 Actualizando sistema${COLOR[reset]}"
152
+ echo -e " ${COLOR[green]}⚠️ Dar autorización Root‼️ ${COLOR[reset]}"
152
153
  sudo apt update -y
153
154
  sudo apt upgrade -y
154
155
  sudo apt full-upgrade -y
156
+
155
157
  }
156
158
 
157
159
  ########################################
@@ -391,20 +393,28 @@ install_apt "${APT_DEV_TOOLS[@]}"
391
393
  ########################################
392
394
 
393
395
  setup_ssh() {
394
-
396
+ clear
395
397
  if [[ -f "$HOME/.ssh/id_ed25519" ]]; then
396
398
  echo "✔ SSH ya configurado"
397
399
  return
398
400
  fi
399
-
401
+ echo -e ' ${COLOR[green]}*********************************************${COLOR[reset]}'
402
+ echo -e ' ${COLOR[green]}* *${COLOR[reset]}'
403
+ echo -e ' ${COLOR[green]}* ${COLOR[yelow]}Crear Clave SSH${COLOR[reset]} *${COLOR[reset]}'
404
+ echo -e ' ${COLOR[green]}* *${COLOR[reset]}'
405
+ echo -e ' ${COLOR[green]}*********************************************${COLOR[reset]}'
406
+ read -rp "Nombre de la clave SSH: " KEY_NAME
400
407
  read -rp "Email SSH: " EMAIL
401
408
 
402
- ssh-keygen -t ed25519 -C "$EMAIL" -f "$HOME/.ssh/id_ed25519" -N ""
409
+ KEY_PATH="$HOME/.ssh/$KEY_NAME"
410
+
411
+ ssh-keygen -t ed25519 -C "$EMAIL" -f "$KEY_PATH" -N ""
403
412
 
413
+ ls -al ~/.ssh
404
414
  eval "$(ssh-agent -s)"
405
- ssh-add "$HOME/.ssh/id_ed25519"
415
+ ssh-add "$KEY_PATH"
406
416
 
407
- cat "$HOME/.ssh/id_ed25519.pub"
417
+ cat "$KEY_PATH.pub"
408
418
 
409
419
  }
410
420
 
@@ -440,8 +450,7 @@ install_snap_tools &
440
450
 
441
451
  wait
442
452
 
443
- #setup_ssh
444
-
453
+ setup_ssh
445
454
  system_cleanup
446
455
 
447
456
  ELAPSED=$(( SECONDS - START ))