Skip to content

Commit 178cedd

Browse files
committed
Allow me to update unversioned dev builds
1 parent 5b6c63a commit 178cedd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

installer.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,17 @@ _install_pkgx() {
9393
unset tmpdir pipe
9494
}
9595

96+
_pkgx_is_old() {
97+
v="$(/usr/local/bin/pkgx --version || echo pkgx 0)"
98+
/usr/local/bin/pkgx --silent semverator gt \
99+
$(curl -Ssf https://pkgx.sh/VERSION) \
100+
$(echo $v | awk '{print $2}')
101+
}
102+
96103
_should_install_pkgx() {
97104
if [ ! -f /usr/local/bin/pkgx ]; then
98105
return 0
99-
elif /usr/local/bin/pkgx --silent semverator gt \
100-
$(curl -Ssf https://pkgx.sh/VERSION) \
101-
$(/usr/local/bin/pkgx --version | awk '{print $2}') >/dev/null 2>&1
102-
then
106+
elif _pkgx_is_old >/dev/null 2>&1; then
103107
return 0
104108
else
105109
return 1

0 commit comments

Comments
 (0)