diff options
author | 160R | 2020-04-11 13:11:00 +0200 |
---|---|---|
committer | 160R | 2020-04-11 13:11:00 +0200 |
commit | 662ea1a8130d21be4dd2783cb64f465c3b9d48bd (patch) | |
tree | af6a9941efb5e95fc418d88242c90e91cf3610c2 | |
parent | ffb8f7a3e7c85ca1759e875f9c0fac83f726dcf9 (diff) | |
download | aur-662ea1a8130d21be4dd2783cb64f465c3b9d48bd.tar.gz |
add. rustc version check
-rw-r--r-- | PKGBUILD | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -20,6 +20,21 @@ pkgver() { git describe --tags --abbrev=0 } +prepare() { + rustc_version=$([[ "$(rustc --version)" =~ rustc\ 1.([0-9]+).* ]] && echo "${BASH_REMATCH[1]}") + + (($rustc_version >= 40)) && return 0; + + # Set error color + echo -e '\e[0;31m' + echo 'Minimum supported rust version is 1.40.0, please update' + echo ' * rustup way: `rustup update`' + echo ' * pacman way: `pacman -Sy rust`' + # Reset color + echo -e '\e[0m' + return 1 +} + package() { checkout_project_root |