Compare commits
	
		
			No commits in common. "a760bbb07585c11a4ec606b13b4a1773c3e61af8" and "8288eb062fa3b9741f4600c5ff6fa6ba9ad22268" have entirely different histories.
		
	
	
		
			a760bbb075
			...
			8288eb062f
		
	
		
					 5 changed files with 0 additions and 170 deletions
				
			
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							|  | @ -21,9 +21,6 @@ | |||
| !README.md | ||||
| !.gitignore | ||||
| 
 | ||||
| # Ignorar archivos específicos | ||||
| CLAUDE.md | ||||
| 
 | ||||
| # Permitir archivos en carpetas específicas | ||||
| # !carpeta1/*.txt | ||||
| !bin/* | ||||
|  |  | |||
							
								
								
									
										
											BIN
										
									
								
								bin/.vpn_users.sh.swp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/.vpn_users.sh.swp
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -1,118 +0,0 @@ | |||
| #!/bin/bash | ||||
| # | ||||
| # cortana_install.sh | ||||
| # Modified: 2024/12/01 15:27:00 | ||||
| # Derechos de Autor (C) [2025] [Mauro Rosero P. <mauro@rosero.one> (mauro.rosero@gmail.com)] | ||||
| # | ||||
| # Este programa es software libre: usted puede redistribuirlo y/o modificarlo | ||||
| # bajo los términos de la Licencia Pública Affero General de GNU tal como | ||||
| # lo publica la Free Software Foundation, ya sea la versión 3 de la licencia, | ||||
| # o (a su elección) cualquier versión posterior. | ||||
| # | ||||
| # Este programa se distribuye con la esperanza de que sea útil, | ||||
| # pero SIN NINGUNA GARANTÍA; sin siquiera la garantía implícita de | ||||
| # COMERCIABILIDAD o IDONEIDAD PARA UN PROPÓSITO PARTICULAR. Consulte la | ||||
| # Licencia Pública Affero General de GNU para obtener más detalles. | ||||
| # | ||||
| # Debería haber recibido una copia de la Licencia Pública Affero General | ||||
| # junto con este programa. Si no la recibió, consulte <https://www.gnu.org/licenses/>. | ||||
| 
 | ||||
| # Script para instalar o desinstalar Anthropoc Claude Code con npm | ||||
| # Uso: | ||||
| #   ./script.sh          -> Instalación | ||||
| #   ./script.sh -u       -> Desinstalación | ||||
| 
 | ||||
| DEVSPATH=devs | ||||
| BIN_HOME=$HOME/$DEVSPATH | ||||
| BIN_MESG=bin/msg | ||||
| BIN_LIBS=bin/lib | ||||
| BIN_CFGS=bin/config | ||||
| VERSION=1.0.1 | ||||
| 
 | ||||
| # CHECK SHELL LANGUAGE | ||||
| BIN_LANG=${LANG:0:2} | ||||
| 
 | ||||
| # LOAD BASE BASH LIBRARY | ||||
| source $BIN_HOME/$BIN_LIBS/base.lib | ||||
| #baselib_test | ||||
| 
 | ||||
| # Load head messages | ||||
| load_messages $BIN_HOME $BIN_MESG $BIN_LANG "head" | ||||
| title="${head_000} ${head_002}" | ||||
| 
 | ||||
| 
 | ||||
| # Verificar que 'dialog' esté instalado | ||||
| if ! command -v dialog &>/dev/null; then | ||||
|   echo "${npm_001}" | ||||
|   exit 1 | ||||
| fi | ||||
| 
 | ||||
| # Verificar que 'npm' esté instalado | ||||
| if ! command -v npm &>/dev/null; then | ||||
|   dialog --backtitle "${title}" --title "${head_error}" --msgbox "${npm_022}" 7 50 | ||||
|   exit 1 | ||||
| fi | ||||
| 
 | ||||
| # Función para preparar pre-requisitos para instalación de Cortana | ||||
| pre_anthropic() { | ||||
|   # First, save a list of your existing global packages for later migration | ||||
|   npm list -g --depth=0 > ~/npm-global-packages.txt | ||||
| 
 | ||||
|   # Create a directory for your global packages | ||||
|   mkdir -p ~/.npm-global | ||||
| 
 | ||||
|   # Configure npm to use the new directory path | ||||
|   npm config set prefix ~/.npm-global | ||||
| 
 | ||||
|   # Note: Replace ~/.bashrc with ~/.zshrc, ~/.profile, or other appropriate file for your shell | ||||
|   echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc | ||||
| 
 | ||||
|   # Apply the new PATH setting | ||||
|   source ~/.bashrc | ||||
| } | ||||
| 
 | ||||
| # Función para instalar Anthropoc Claude Code | ||||
| install_anthropic() { | ||||
|   dialog --backtitle "${title}" --title "${npm_018} ${npm_000} ${npm_000_1}" --msgbox "${npm_023}" 7 60 | ||||
|   # Ejecutar la instalación | ||||
|   pre_anthropic | ||||
|   npm install -g @anthropic-ai/claude-code | ||||
|   if [[ $? -eq 0 ]]; then | ||||
|     cortana_alias | ||||
|     dialog  --backtitle "${title}" --title "${npm_014}" --msgbox "${npm_024}" 7 50 | ||||
|   else | ||||
|     dialog --backtitle "${title}" --title "${head-error}" --msgbox "${npm_025}" 7 50 | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| # Función para desinstalar Anthropoc Claude Code | ||||
| uninstall_anthropic() { | ||||
|   dialog --backtitle "${title}" --title "${npm_026} ${npm_000} ${npm_000_1}" --msgbox "${npm_027}" 7 60 | ||||
|   # Ejecutar la desinstalación | ||||
|   npm uninstall -g @anthropic-ai/claude-code | ||||
|   if [[ $? -eq 0 ]]; then | ||||
|     dialog --backtitle "${title}" --title "${npm_028}" --msgbox "${npm_029}" 7 50 | ||||
|   else | ||||
|     dialog --backtitle "${title}" --title "${head_eror}" --msgbox "${npm_030}" 7 50 | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| # Evaluar el parámetro posicional | ||||
| if [[ "$1" == "-u" ]]; then | ||||
|   dialog --backtitle "${title}" --title "${npm_031}" --yesno "${npm_032}" 7 50 | ||||
|   if [[ $? -eq 0 ]]; then | ||||
|     uninstall_anthropic | ||||
|   else | ||||
|     dialog --backtitle "${title}" --title "${head_canceled}" --msgbox "${npm_008}" 6 40 | ||||
|     exit 1 | ||||
|   fi | ||||
| else | ||||
|   dialog --backtitle "${title}" --title "${npm_031}" --yesno "${npm_033}" 7 50 | ||||
|   if [[ $? -eq 0 ]]; then | ||||
|     install_anthropic | ||||
|   else | ||||
|     dialog --backtitle "${title}" --title "${head_canceled}" --msgbox "${npm_008}" 6 40 | ||||
|     exit 1 | ||||
|   fi | ||||
| fi | ||||
| 
 | ||||
|  | @ -416,37 +416,3 @@ function sops_freekv_token() { | |||
|   return 0 | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| # Alias claude code to cortana | ||||
| cortana_alias() { | ||||
|     local alias_nombre="cortana" | ||||
|     local alias_comando="claude" | ||||
|     local shell_config="" | ||||
|      | ||||
|     # Detectar el shell actual y seleccionar el archivo de configuración adecuado | ||||
|     case "$SHELL" in | ||||
|         */bash) | ||||
|             shell_config="$HOME/.bashrc" | ||||
|             ;; | ||||
|         */zsh) | ||||
|             shell_config="$HOME/.zshrc" | ||||
|             ;; | ||||
|         *) | ||||
|             return 1 | ||||
|             ;; | ||||
|     esac | ||||
| 
 | ||||
|     # Verificar si el alias ya existe en el archivo de configuración | ||||
|     if grep -q "alias $alias_nombre=" "$shell_config"; then | ||||
|       return 2 | ||||
|     else | ||||
|         # Agregar el alias al final del archivo de configuración | ||||
|         echo "alias $alias_nombre='$alias_comando'" >> "$shell_config" | ||||
|         if [[ $? -eq 0 ]]; then | ||||
|             # Recargar el archivo de configuración | ||||
|             source "$shell_config" | ||||
|         else | ||||
|             return 1 | ||||
|         fi | ||||
|     fi | ||||
| } | ||||
|  |  | |||
|  | @ -50,7 +50,6 @@ vldt_011="Duración de clave gpg inválida!" | |||
| vldt_012="No es un nombre de dominio DNS válido!" | ||||
| vldt_013="Valor debe ser alguno de estos:" | ||||
| vldt_014="Valor no está dentro del rango válido:" | ||||
| 
 | ||||
| os_update="Actualizando sistema operativo " | ||||
| os_nofound="Sistemas operativos soportados: Ubuntu, Debian, Arch Linux, Fedora, Redhat, AlmaLinux, Rocky, Oracle Linux, FreeBSD, MacOS" | ||||
| 
 | ||||
|  | @ -66,8 +65,6 @@ git_first_commited="[INIT] Proyecto inicializado" | |||
| git_end_commited="Todos los cambios al repositorio nuevo han sido aplicados!" | ||||
| git_new_project_pushed="Proyecto ha sido creado/actualizado en repositorio remoto" | ||||
| 
 | ||||
| npm_000="Cortana" | ||||
| npm_000_1="Rosero One" | ||||
| npm_001="El programa 'dialog' no está instalado. Por favor, instálalo e inténtalo nuevamente." | ||||
| npm_002="No eres super usuario. Ingresa la contraseña para escalamiento:" | ||||
| npm_003="Contraseña incorrecta o error al escalar privilegios." | ||||
|  | @ -90,15 +87,3 @@ npm_018="Instalación" | |||
| npm_019="Versiones instaladas:" | ||||
| npm_020="No encontrado" | ||||
| npm_021="Instalación Finalizada" | ||||
| npm_022="npm no está instalado. Por favor instálalo e inténtalo de nuevo." | ||||
| npm_023="Se procederá a instalar Anthropoc Claude Code usando npm." | ||||
| npm_024="Instalación completada satisfactoriamente." | ||||
| npm_025="Ocurrió un error durante la instalación." | ||||
| npm_026="Desinstalar" | ||||
| npm_027="Se procederá a desinstalar Anthropoc Claude Code usando npm." | ||||
| npm_028="Desinstalación Completa" | ||||
| npm_029="Desinstalación completada exitosamente." | ||||
| npm_030="Ocurrió un error durante la desinstalación." | ||||
| npm_031="Confirmación" | ||||
| npm_032="¿Está seguro que desea desinstalar Anthropoc Claude Code?" | ||||
| npm_033="¿Desea instalar Anthropoc Claude Code?" | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue