Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # denice
- renice -n 9 -p $$
- # assume the ncspot folder lies in the same dir as this script
- ncspot_dir=$(dirname "$0")/ncspot
- # and get the absolute path
- ncspot_dir=$(readlink -f $ncspot_dir)
- # the toolchain to use
- toolchain='stable'
- cd $ncspot_dir
- # i needed this, maybe it was a mistake
- rm Cargo.lock
- # pull the changes from git
- git pull --ff-only
- # only update the toolchain we need (if you switch toolchains, you have to change this)
- #rustup update
- echo ==rustup update==
- rustup update $toolchain
- # update the dependencies
- echo ==cargo update==
- rustup run --install $toolchain cargo update
- echo ==cargo build==
- cargo +$toolchain build --release
- # remove old artifacts, because cargo doesn't do that and folder grows over 10Gb
- find $ncspot_dir/target/*/{deps,build} -mindepth 1 -atime +0 -delete
Advertisement
Add Comment
Please, Sign In to add comment