fixes
[buildscripts] / rust
diff --git a/rust b/rust
index ab70029ba354633bb6f8c31e2d88e32fb3d1fce0..ceaf4c21a4832a0ca971f58bb80c276c6b26dedc 100755 (executable)
--- a/rust
+++ b/rust
@@ -11,6 +11,12 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 # source /path/errhandle/err
 # on my machine
 source /a/bin/errhandle/err
+source /a/bin/distro-functions/src/package-manager-abstractions
+
+PATH="$PATH:$HOME/.cargo/bin"
+hash -r
+
+# todo: this should happen in some kind of sandbox or vm
 
 # install rust.
 if type -t rustc &>/dev/null; then
@@ -18,13 +24,16 @@ if type -t rustc &>/dev/null; then
 else
   curl https://sh.rustup.rs -sSf | bash -s -- -y
 fi
-# todo: update this. updates in rust are stupidly complicate
+
 if ! which rg &>/dev/null; then
   cargo install ripgrep
 fi
 
 if ! type -t cargo-install-update &>/dev/null; then
-  cargo-install-update
+  # due to
+  # error: failed to run custom build command for `openssl-sys v0.9.53`
+  pi libssl-dev pkg-config
+  cargo install cargo-update
 fi
 
 cargo install-update -a