diff options
author | Zakary Kamal Ismail | 2018-03-11 09:39:56 -0400 |
---|---|---|
committer | Zakary Kamal Ismail | 2018-03-11 09:39:56 -0400 |
commit | e239a03e6ea040be03e80ff6892459934c851d30 (patch) | |
tree | 2bb2c6ebf9a218e8228eb2e6998c872de5d0229d | |
parent | 83aae1b5f3f382fec623180a0f22daa9cc931196 (diff) | |
download | aur-e239a03e6ea040be03e80ff6892459934c851d30.tar.gz |
Added scripts to the prepare function to make sure that there's a default toolchain and that cargo is then usable
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 18 |
2 files changed, 16 insertions, 4 deletions
@@ -1,6 +1,6 @@ pkgbase = rust-qt-binding-generator-git pkgdesc = Generates Qt binding for Rust code from a JSON file - pkgver = 0.1.0 + pkgver = 0.1.1 pkgrel = 1 url = https://github.com/KDE/rust-qt-binding-generator arch = any @@ -1,6 +1,6 @@ # Maintainer: Zakary Kamal Ismail <zakary.kamal.fs@outlook.com> pkgname=rust-qt-binding-generator-git -pkgver=0.1.0 +pkgver=0.1.1 pkgrel=1 pkgdesc="Generates Qt binding for Rust code from a JSON file" arch=('any') @@ -14,8 +14,20 @@ source=("git+http://github.com/KDE/${pkgname%-git}.git") md5sums=(SKIP) prepare() { - cd $srcdir/${pkgname%-git} -} + + # Make sure that a default toolchain is setup + { # try + cargo + } || { # catch + setterm -foreground red + echo "You have no default toolchain installed" + echo "Installing and/or setting stable as your default toolchain" + setterm -foreground default + rustup default stable + } + + cd $srcdir/${pkgname%-git} + } build() { cd $srcdir/${pkgname%-git} |