mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
invoke automamba from pippy
if it exists (also affects pegg
) (gross hack)
This commit is contained in:
parent
76776c7b55
commit
b5c5ebfded
1 changed files with 7 additions and 1 deletions
8
sh/pippy
8
sh/pippy
|
@ -8,10 +8,16 @@ pippy() { ### @-
|
||||||
### install Python packages using pip,
|
### install Python packages using pip,
|
||||||
### but only update their dependencies as required.
|
### but only update their dependencies as required.
|
||||||
### this uses [`maybesudo`](#maybesudo_-shmaybesudo) internally.
|
### this uses [`maybesudo`](#maybesudo_-shmaybesudo) internally.
|
||||||
|
if [ -s ~/work/automamba ]; then
|
||||||
|
~/work/automamba --pip install --upgrade --upgrade-strategy only-if-needed --dry-run "$@"
|
||||||
|
confirm || return
|
||||||
|
~/work/automamba --pip install --upgrade --upgrade-strategy only-if-needed "$@"
|
||||||
|
return
|
||||||
|
fi
|
||||||
local sudo="$(has sudo || echo maybesudo_)"
|
local sudo="$(has sudo || echo maybesudo_)"
|
||||||
"$sudo" python3 -m pip install --upgrade --upgrade-strategy only-if-needed "$@"
|
"$sudo" python3 -m pip install --upgrade --upgrade-strategy only-if-needed "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -n "${preload+-}" ] || . ~/sh/preload || exit 2
|
[ -n "${preload+-}" ] || . ~/sh/preload || exit 2
|
||||||
eval ${preload:-preload} has maybesudo
|
eval ${preload:-preload} has maybesudo confirm
|
||||||
[ -n "${preload+-}" ] || pippy "$@"
|
[ -n "${preload+-}" ] || pippy "$@"
|
||||||
|
|
Loading…
Add table
Reference in a new issue