Arreglo para bash
This commit is contained in:
parent
ce65e596ab
commit
968a0812b6
|
@ -189,7 +189,7 @@ Ejemplos:
|
||||||
|
|
||||||
### Instalador
|
### Instalador
|
||||||
|
|
||||||
instalar (){
|
instalar () {
|
||||||
if [[ $(distro-name) = "Arch Linux" ]]; then
|
if [[ $(distro-name) = "Arch Linux" ]]; then
|
||||||
yay -Syy $@
|
yay -Syy $@
|
||||||
else
|
else
|
||||||
|
@ -199,7 +199,7 @@ instalar (){
|
||||||
|
|
||||||
### Desinstalador
|
### Desinstalador
|
||||||
|
|
||||||
desinstalar (){
|
desinstalar () {
|
||||||
if [[ $(distro-name) = "Arch Linux" ]]; then
|
if [[ $(distro-name) = "Arch Linux" ]]; then
|
||||||
yay -Rss $@
|
yay -Rss $@
|
||||||
else
|
else
|
||||||
|
@ -361,7 +361,7 @@ Ejemplos:
|
||||||
# Obtiene directorio padre
|
# Obtiene directorio padre
|
||||||
|
|
||||||
parent () {
|
parent () {
|
||||||
if [ $# -eq 0 ]; then curr="$PWD" else curr=$1 fi
|
if [ $# -eq 0 ]; then curr="$PWD"; else curr=$1; fi
|
||||||
echo $(python3 -c """
|
echo $(python3 -c """
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
print(Path('$curr').resolve().parent)
|
print(Path('$curr').resolve().parent)
|
||||||
|
@ -372,7 +372,7 @@ print(Path('$curr').resolve().parent)
|
||||||
## Desactiva o activa virtualenv
|
## Desactiva o activa virtualenv
|
||||||
|
|
||||||
check-venv () {
|
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
|
if [ -f "$curr/$VENV/bin/activate" ]; then
|
||||||
source $curr/$VENV/bin/activate
|
source $curr/$VENV/bin/activate
|
||||||
elif [[ $(parent $1) != "/" ]]; then
|
elif [[ $(parent $1) != "/" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue