@@ -54,20 +54,23 @@ _install_pre_reqs() {
5454
5555 # minimal but required or networking doesn’t work
5656 # https://packages.debian.org/buster/all/netbase/filelist
57- A=netbase
57+ A=" netbase"
5858
5959 # difficult to pkg in our opinion
6060 B=libudev-dev
6161
62+ # ca-certs needed until we bundle our own root cert
63+ C=ca-certificates
64+
6265 case $( cat /etc/debian_version) in
6366 jessie/sid|8.* |stretch/sid|9.* )
64- apt --yes install libc-dev libstdc++-4.8-dev libgcc-4.7-dev $A $B ;;
67+ apt install --yes libc-dev libstdc++-4.8-dev libgcc-4.7-dev $A $B $C ;;
6568 buster/sid|10.* )
66- apt --yes install libc-dev libstdc++-8-dev libgcc-8-dev $A $B ;;
69+ apt install --yes libc-dev libstdc++-8-dev libgcc-8-dev $A $B $C ;;
6770 bullseye/sid|11.* )
68- apt --yes install libc-dev libstdc++-10-dev libgcc-9-dev $A $B ;;
71+ apt install --yes libc-dev libstdc++-10-dev libgcc-9-dev $A $B $C ;;
6972 bookworm/sid|12.* |* )
70- apt --yes install libc-dev libstdc++-11-dev libgcc-11-dev $A $B ;;
73+ apt install --yes libc-dev libstdc++-11-dev libgcc-11-dev $A $B $C ;;
7174 esac
7275 elif test -f /etc/fedora-release; then
7376 $SUDO yum --assumeyes install libatomic
@@ -129,10 +132,12 @@ _install_pkgx() {
129132}
130133
131134_pkgx_is_old () {
132- v=" $( /usr/local/bin/pkgx --version || echo pkgx 0) "
133- /usr/local/bin/pkgx --silent semverator gt \
134- $( curl -Ssf https://pkgx.sh/VERSION) \
135- $( echo $v | awk ' {print $2}' )
135+ new_version=$( curl -Ssf https://pkgx.sh/VERSION)
136+ old_version=$( /usr/local/bin/pkgx --version || echo pkgx 0)
137+ old_version=$( echo $old_version | cut -d' ' -f2)
138+ major_version=$( echo $new_version | cut -d. -f1)
139+
140+ /usr/local/bin/pkgx --silent semverator gt $new_version $old_version
136141}
137142
138143_should_install_pkgx () {
@@ -160,8 +165,11 @@ if [ $# -gt 0 ]; then
160165elif [ $( basename " /$0 " ) != ' installer.sh' ]; then
161166 # ^^ temporary exception for action.ts
162167
163- if type eval > /dev/null 2>&1 ; then
164- # we `type eval` as on Travis there was no `eval`!
168+ if ! [ " $major_version " = " 0" ]; then
169+ major_version=$( pkgx --version | cut -d' ' -f2 | cut -d. -f1)
170+ fi
171+
172+ if [ $major_version -lt 2 ] && type eval > /dev/null 2>&1 ; then
165173 eval " $( pkgx --shellcode) " 2> /dev/null
166174 fi
167175
0 commit comments