bash: aur(): only try cloning if it doesn’t already exist
authorAmin Bandali <bandali@gnu.org>
Sun, 14 Apr 2019 20:56:05 +0000 (16:56 -0400)
committerAmin Bandali <bandali@gnu.org>
Sun, 14 Apr 2019 20:56:05 +0000 (16:56 -0400)
.bashrc

diff --git a/.bashrc b/.bashrc
index 3a76eff..a5cc322 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -38,7 +38,7 @@ alias best="youtube-dl -f best"
 
 aur() {
    cd ~/usr/builds
-   git clone https://aur.archlinux.org/${1}.git
+   [ -d ${1} ] || git clone https://aur.archlinux.org/${1}.git
    cd ${1}
 }