1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 08:19:03 -08:00
rc/sh/pippy

13 lines
248 B
Text
Raw Normal View History

#!/usr/bin/env sh
2021-07-29 00:37:35 -07:00
# YES_ZSH
#. ~/sh/maybesudo
#. ~/sh/has
pippy() { ### @-
2021-07-29 00:37:35 -07:00
local sudo="$(has sudo || echo maybesudo_)"
"$sudo" py -m pip install --upgrade --upgrade-strategy only-if-needed "$@"
}
[ "${SOURCING:-0}" -gt 0 ] || pippy "$@"