Skip to content

Commit

Permalink
fixed rust[-prebuilt] plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ekalinin committed Oct 30, 2016
1 parent 3e70dc2 commit bb149fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/nv-plugins/rust
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Output lists of versions
plug_list_versions() {
echo $(curl -s https://static.rust-lang.org/dist/index.html | \
egrep 'dist\/rust-[0-9]+\.[0-9]+(\.[0-9]+)*\.tar\.gz' | \
egrep 'dist\/rustc-[0-9]+\.[0-9]+(\.[0-9]+)*-src\.tar\.gz' | \
egrep -o '[0-9]+\.[0-9]+(\.[0-9]+)*' | uniq | \
sort -u -k 1,1n -k 2,2n -k 3,3n -t .)
# added date to distinct each nightly build
Expand All @@ -17,10 +17,10 @@ plug_url_for_download() {
case $version in
*nightly*)
# just drop date and and download
echo "http://static.rust-lang.org/dist/rust-nightly-src.tar.gz"
echo "https://static.rust-lang.org/dist/rust-nightly-src.tar.gz"
;;
*)
echo "http://static.rust-lang.org/dist/rust-${version}.tar.gz"
echo "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
esac
}

Expand Down
10 changes: 8 additions & 2 deletions src/nv-plugins/rust-prebuilt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ plug_url_for_download() {
case $version in
*nightly*)
# just drop date and and download
echo "http://static.rust-lang.org/dist/rust-nightly-${arch}-${system}.tar.gz"
echo "https://static.rust-lang.org/dist/rustc-nightly-${arch}-${system}.tar.gz"
;;
*)
echo "http://static.rust-lang.org/dist/rust-${version}-${arch}-${system}.tar.gz"
echo "https://static.rust-lang.org/dist/rustc-${version}-${arch}-${system}.tar.gz"
esac
}

Expand All @@ -24,3 +24,9 @@ plug_build() {
local build_path=$2
cp -r "$src_path"/*/* "$build_path"
}

plug_build_env() {
local build_path=$1
local env_name_full=$2
cp -r "$build_path"/rustc/* $env_name_full
}

0 comments on commit bb149fe

Please sign in to comment.