Arreglo para bash

This commit is contained in:
perro tuerto 2023-05-29 12:06:34 -07:00
parent ce65e596ab
commit 968a0812b6
1 changed files with 4 additions and 4 deletions

View File

@ -189,7 +189,7 @@ Ejemplos:
### Instalador
instalar (){
instalar () {
if [[ $(distro-name) = "Arch Linux" ]]; then
yay -Syy $@
else
@ -199,7 +199,7 @@ instalar (){
### Desinstalador
desinstalar (){
desinstalar () {
if [[ $(distro-name) = "Arch Linux" ]]; then
yay -Rss $@
else
@ -361,7 +361,7 @@ Ejemplos:
# Obtiene directorio padre
parent () {
if [ $# -eq 0 ]; then curr="$PWD" else curr=$1 fi
if [ $# -eq 0 ]; then curr="$PWD"; else curr=$1; fi
echo $(python3 -c """
from pathlib import Path
print(Path('$curr').resolve().parent)
@ -372,7 +372,7 @@ print(Path('$curr').resolve().parent)
## Desactiva o activa virtualenv
check-venv () {
if [ $# -eq 0 ]; then curr="$PWD" else curr=$1 fi
if [ $# -eq 0 ]; then curr="$PWD"; else curr=$1; fi
if [ -f "$curr/$VENV/bin/activate" ]; then
source $curr/$VENV/bin/activate
elif [[ $(parent $1) != "/" ]]; then