summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD15
1 files changed, 15 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7645a1463c3..c8af7846c18 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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