Skip to content

Commit ebd89e2

Browse files
committed
Workaround #2033
1 parent a56d6ce commit ebd89e2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

bin/clicksnap-setup

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ fatal() { echo "FATAL [$(basename "$0")]: $*" 1>&2; exit 1; }
1212
warn() { echo -e "WARNING [$(basename "$0")]: $*"; }
1313
info() { echo "INFO [$(basename "$0")]: $*"; }
1414

15+
# XXX this is only a temporary measure
16+
# see: https://github.com/turnkeylinux/tracker/issues/2033
17+
RUST_V=1.76.0
18+
CARGO_V="+$RUST_V"
19+
1520
usage() {
1621
local msg="$*"
1722
cat<<EOF
@@ -112,14 +117,17 @@ done
112117
case "$(which cargo || echo 'fail')" in
113118
"$HOME/.cargo/bin/cargo")
114119
info "Rust installed via rustup detected, attempting update"
115-
rustup update
120+
# TODO see note re $RUST_V above
121+
rustup update "$RUST_V"
116122
;;
117123
/usr/bin/cargo)
118124
warn "system installed rust detected; continuing but may cause issues\n" \
119125
" - if you encountner issues, please remove rust and rerun";;
120126
fail)
121127
info "Installing rust via rustup"
122128
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
129+
# TODO see note re $RUST_V above
130+
rustup update "$RUST_V"
123131
echo "export PATH=\"\$HOME/.cargo/bin:\$PATH\"" > "$HOME"/.bashrc.d/rust
124132
chmod +x "$HOME"/.bashrc.d/rust
125133
source "$HOME/.bashrc.d/rust";;
@@ -129,7 +137,7 @@ esac
129137

130138
cd "$BASE_DIR"/clicksnap
131139
info "Building & installing clicksnap"
132-
cargo build
140+
cargo build "$CARGO_V"
133141
ln -sf "$PWD"/target/debug/clicksnap /usr/local/bin/clicksnap
134142
ln -sf "$BASE_DIR"/tkldev-docker/dockerize.sh /usr/local/bin/dockerize
135143
ln -sf "$BASE_DIR"/tkldev-docker/wait-ready.sh /usr/local/bin/tkl-docker-wait-ready

0 commit comments

Comments
 (0)