-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyayInstall.sh
executable file
·53 lines (44 loc) · 2.18 KB
/
yayInstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
cat << "EOF"
██╗ ██╗ █████╗ ██╗ ██╗
╚██╗ ██╔╝██╔══██╗╚██╗ ██╔╝
╚████╔╝ ███████║ ╚████╔╝
╚██╔╝ ██╔══██║ ╚██╔╝
██║ ██║ ██║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═╝
EOF
# ------------------------------------------------------
# Load library from modules directory in Dotfiles
# ------------------------------------------------------
source $(dirname "$0")/modules/library.sh
clear
cat << "EOF"
██╗███╗ ██╗███████╗████████╗ █████╗ ██╗ ██╗
██║████╗ ██║██╔════╝╚══██╔══╝██╔══██╗██║ ██║
██║██╔██╗ ██║███████╗ ██║ ███████║██║ ██║
██║██║╚██╗██║╚════██║ ██║ ██╔══██║██║ ██║
██║██║ ╚████║███████║ ██║ ██║ ██║███████╗███████╗
╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝
EOF
# ------------------------------------------------------
# Check and create ~/Tmp directory
# ------------------------------------------------------
TMP_DIR="$HOME/Tmp"
if [ ! -d "$TMP_DIR" ]; then
mkdir "$TMP_DIR"
fi
# ------------------------------------------------------
# Check if yay is installed
# ------------------------------------------------------
if sudo pacman -Qs yay > /dev/null ; then
echo "yay is installed. You can proceed with the installation"
else
echo "yay is not installed. Will be installed now!"
_installPackagesPacman "base-devel"
git clone https://aur.archlinux.org/yay-git.git "$TMP_DIR/yay-git"
cd "$TMP_DIR/yay-git"
makepkg -si
cd "$HOME/dotfiles/"
clear
echo "yay has been installed successfully."
fi