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

12 lines
241 B
Bash

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