OSDN Git Service

[fix] : yay check
authorhayao <hayao@fascode.net>
Sat, 20 Mar 2021 14:09:51 +0000 (23:09 +0900)
committerhayao <hayao@fascode.net>
Sat, 20 Mar 2021 14:09:51 +0000 (23:09 +0900)
system/aur.sh

index d8d9877..d37d1fd 100755 (executable)
@@ -10,13 +10,6 @@ set -e -u
 
 aur_username="aurbuild"
 
-# Check yay
-if ! type -p yay > /dev/null; then
-    echo "yay was not found. Please install it."
-    exit 1
-fi
-
-
 # Delete file only if file exists
 # remove <file1> <file2> ...
 function remove () {
@@ -72,6 +65,12 @@ ls "/usr/share/pacman/keyrings/"*".gpg" | sed "s|.gpg||g" | xargs | pacman-key -
     cd "${_oldpwd}"
 )
 
+if ! type -p yay > /dev/null; then
+    echo "Failed to install yay"
+    exit 1
+fi
+
+
 # Build and install
 chmod +s /usr/bin/sudo
 for _pkg in "${@}"; do