File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,17 +82,14 @@ _install_pkgx() {
8282}
8383
8484_should_install_pkgx () {
85- if ! command -v pkgx > /dev/null 2>&1 ; then
85+ if [ -x /usr/local/bin/pkgx ] && [ -f /usr/local/bin/pkgx ]; then
86+ # if the installed version is less than the available version then upgrade
87+ /usr/local/bin/pkgx --silent semverator gt \
88+ $( curl -Ssf https://pkgx.sh/VERSION) \
89+ $( /usr/local/bin/pkgx --version | awk ' {print $2}' ) > /dev/null 2>&1
90+ else
8691 return 0
87- elif [ $( /usr/bin/which pkgx) != /usr/local/bin/pkgx ]; then
88- # if pkgx is not installed to /usr/local/bin then we’re not getting involved
89- return 1
9092 fi
91-
92- # if the installed version is less than the available version then upgrade
93- pkgx --silent semverator gt \
94- $( curl -Ssf https://pkgx.sh/VERSION) \
95- $( /usr/local/bin/pkgx --version | awk ' {print $2}' ) > /dev/null 2>&1
9693}
9794
9895# ########################################################################## meat
You can’t perform that action at this time.
0 commit comments