From 92232138f6e84c65a470250098b23dab6428ee6a Mon Sep 17 00:00:00 2001 From: Jorge Ulises Useche Cuellar Date: Wed, 27 Jun 2018 22:01:00 -0500 Subject: [PATCH] Apt aliases outside of runtime bashrc script --- README.md | 5 +++++ instalar.sh | 21 ++++++++++----------- update.sh | 2 ++ 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 update.sh diff --git a/README.md b/README.md index 533db0a..0317f90 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,11 @@ Se puede desinstalar fácilmente ejecutando: ( recuerda poner el proxy :D ) curl https://raw.githubusercontent.com/GLUD/distroCustomization/master/desinstalar.sh | bash ``` +O incluso actualizarlo: ( recuerda poner el proxy :D ) +```bash +curl https://raw.githubusercontent.com/GLUD/distroCustomization/master/update.sh | bash +``` + **Nota:** Si usas Solus el directorio `/usr/local/bin` no existe por defecto, puedes crearlo usando el siguiente comando: ```bash sudo mkdir -p /usr/local/bin diff --git a/instalar.sh b/instalar.sh index bd6a1c6..1b02986 100755 --- a/instalar.sh +++ b/instalar.sh @@ -155,20 +155,19 @@ export HISTIGNORE="&:ls:ll:la:l.:pwd:exit:clear" EOF # rationale: algunos alias para gestor de paquetes apt - sudo tee -a $aplicacion << 'EOF' + if apt --version &> /dev/null + then + sudo tee -a $aplicacion << 'EOF' # rationale: alias para comando apt -if apt --version &> /dev/null -then - alias aref='sudo apt update' - alias aup='sudo apt upgrade' - alias ain='sudo apt install' - alias ase='apt search' - alias arm='sudo apt remove' - alias aarm='sudo apt autoremove' -fi +alias aref='sudo apt update' +alias aup='sudo apt upgrade' +alias ain='sudo apt install' +alias ase='apt search' +alias arm='sudo apt remove' +alias aarm='sudo apt autoremove' EOF - + fi fi # rationale: se adiciona una línea en los .bashrc que hace un source al glud.sh diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..db0a06d --- /dev/null +++ b/update.sh @@ -0,0 +1,2 @@ +curl https://raw.githubusercontent.com/GLUD/distroCustomization/master/desinstalar.sh | bash +curl https://raw.githubusercontent.com/GLUD/distroCustomization/master/instalar.sh | bash