@@ -54,20 +54,21 @@ _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+ # ca-certs needed until we bundle our own root cert
58+ A=" netbase ca-certificates"
5859
5960 # difficult to pkg in our opinion
6061 B=libudev-dev
6162
6263 case $( cat /etc/debian_version) in
6364 jessie/sid|8.* |stretch/sid|9.* )
64- apt --yes install libc-dev libstdc++-4.8-dev libgcc-4.7-dev $A $B ;;
65+ apt install --yes libc-dev libstdc++-4.8-dev libgcc-4.7-dev $A $B ;;
6566 buster/sid|10.* )
66- apt --yes install libc-dev libstdc++-8-dev libgcc-8-dev $A $B ;;
67+ apt install --yes libc-dev libstdc++-8-dev libgcc-8-dev $A $B ;;
6768 bullseye/sid|11.* )
68- apt --yes install libc-dev libstdc++-10-dev libgcc-9-dev $A $B ;;
69+ apt install --yes libc-dev libstdc++-10-dev libgcc-9-dev $A $B ;;
6970 bookworm/sid|12.* |* )
70- apt --yes install libc-dev libstdc++-11-dev libgcc-11-dev $A $B ;;
71+ apt install --yes libc-dev libstdc++-11-dev libgcc-11-dev $A $B ;;
7172 esac
7273 elif test -f /etc/fedora-release; then
7374 $SUDO yum --assumeyes install libatomic
@@ -129,10 +130,12 @@ _install_pkgx() {
129130}
130131
131132_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}' )
133+ new_version=$( curl -Ssf https://pkgx.sh/VERSION)
134+ old_version=$( /usr/local/bin/pkgx --version || echo pkgx 0)
135+ old_version=$( echo $old_version | cut -d' ' -f2)
136+ major_version=$( echo $new_version | cut -d. -f1)
137+
138+ /usr/local/bin/pkgx --silent semverator gt $new_version $old_version
136139}
137140
138141_should_install_pkgx () {
@@ -160,8 +163,11 @@ if [ $# -gt 0 ]; then
160163elif [ $( basename " /$0 " ) != ' installer.sh' ]; then
161164 # ^^ temporary exception for action.ts
162165
163- if type eval > /dev/null 2>&1 ; then
164- # we `type eval` as on Travis there was no `eval`!
166+ if ! [ " $major_version " = " 0" ]; then
167+ major_version=$( pkgx --version | cut -d' ' -f2 | cut -d. -f1)
168+ fi
169+
170+ if [ $major_version -lt 2 ] && type eval > /dev/null 2>&1 ; then
165171 eval " $( pkgx --shellcode) " 2> /dev/null
166172 fi
167173
0 commit comments