mirror of
https://github.com/notwa/rc
synced 2024-11-05 06:39:02 -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,
|
||||
### but only update their dependencies as required.
|
||||
### 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_)"
|
||||
"$sudo" python3 -m pip install --upgrade --upgrade-strategy only-if-needed "$@"
|
||||
}
|
||||
|
||||
[ -n "${preload+-}" ] || . ~/sh/preload || exit 2
|
||||
eval ${preload:-preload} has maybesudo
|
||||
eval ${preload:-preload} has maybesudo confirm
|
||||
[ -n "${preload+-}" ] || pippy "$@"
|
||||
|
|
Loading…
Reference in a new issue