Changeset View
Changeset View
Standalone View
Standalone View
update_sources.sh
| #!/bin/sh | |||||
| # Fetch the latest sources and sha256sums automagically | # Fetch the latest sources and sha256sums automagically | ||||
| VERSION=1.32.0 | |||||
| mkdir /tmp/rust; cd /tmp/rust | |||||
| wget https://raw.githubusercontent.com/rust-lang/rust/${VERSION}/src/stage0.txt | VERSION=$1 | ||||
| DATE=`cat stage0.txt | grep ^date | awk '{ print $2 }'` | |||||
| RUSTV=`cat stage0.txt | grep ^rustc | awk '{ print $2 }'` | alias silent_wget='wget -q' | ||||
| CARGOV=`cat stage0.txt | grep ^cargo | awk '{ print $2 }'` | |||||
| mkdir /tmp/rust; cd /tmp/rust | |||||
| silent_wget https://raw.githubusercontent.com/rust-lang/rust/${VERSION}/src/stage0.txt | |||||
| DATE=$(grep '^date' stage0.txt | awk '{ print $2 }') | |||||
| RUSTV=$(grep '^rustc' stage0.txt | awk '{ print $2 }') | |||||
| CARGOV=$(grep '^cargo' stage0.txt | awk '{ print $2 }') | |||||
| URLS=" | URLS=" | ||||
| https://static.rust-lang.org/dist/rustc-${VERSION}-src.tar.gz | https://static.rust-lang.org/dist/rustc-${VERSION}-src.tar.gz | ||||
| https://static.rust-lang.org/dist/${DATE}/rustc-${RUSTV}-x86_64-unknown-linux-gnu.tar.gz | https://static.rust-lang.org/dist/${DATE}/rustc-${RUSTV}-x86_64-unknown-linux-gnu.tar.gz | ||||
| https://static.rust-lang.org/dist/${DATE}/rust-std-${RUSTV}-x86_64-unknown-linux-gnu.tar.gz | https://static.rust-lang.org/dist/${DATE}/rust-std-${RUSTV}-x86_64-unknown-linux-gnu.tar.gz | ||||
| https://static.rust-lang.org/dist/${DATE}/cargo-${CARGOV}-x86_64-unknown-linux-gnu.tar.gz | https://static.rust-lang.org/dist/${DATE}/cargo-${CARGOV}-x86_64-unknown-linux-gnu.tar.gz | ||||
| " | " | ||||
| for i in ${URLS}; do | for i in ${URLS}; do | ||||
| wget ${i}.sha256 | silent_wget ${i}.sha256 | ||||
| done | done | ||||
| for i in ${URLS}; do | for i in ${URLS}; do | ||||
| j=`basename ${i}` | j=$(basename ${i}) | ||||
| echo " - ${i} : `cat ${j}.sha256 | awk '{ print $1 }'`" | echo " - ${i} : $(awk '{ print $1 }' ${j}.sha256)" | ||||
| done | done | ||||
| rm -rf /tmp/rust | rm -rf /tmp/rust | ||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.