Arreglo para bash
This commit is contained in:
parent
ce65e596ab
commit
968a0812b6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue