|
2 | 2 | # ======================================================================================================================== |
3 | 3 | # Author: |
4 | 4 | # Mohamed Hussein Al-Adawy |
5 | | -# Version: 1.3.0 |
| 5 | +# Version: 1.4.0 |
6 | 6 | # Description: |
7 | 7 | # This setup script installs and configures OCR4Linux and its dependencies. |
8 | 8 | # It handles the installation of: |
@@ -53,39 +53,56 @@ x11_session_apps=( |
53 | 53 |
|
54 | 54 | # Check if yay is installed. |
55 | 55 | check_yay() { |
| 56 | + echo "Checking for yay AUR helper..." |
56 | 57 | if ! command -v yay &>/dev/null; then |
57 | 58 | read -r -p "yay is not installed. Do you want to install yay? (y/n): " choice |
58 | 59 | if [ "$choice" = "y" ]; then |
59 | 60 | sudo pacman -S --needed --noconfirm git base-devel |
60 | 61 | git clone https://aur.archlinux.org/yay.git |
61 | 62 | cd yay || exit |
62 | 63 | makepkg -si --noconfirm |
| 64 | + echo "yay has been installed successfully." |
63 | 65 | else |
64 | 66 | echo "Please install yay first!" |
65 | 67 | return 1 |
66 | 68 | fi |
| 69 | + else |
| 70 | + echo "yay is already installed." |
67 | 71 | fi |
68 | 72 | } |
69 | 73 |
|
70 | 74 | # Install the required packages. |
71 | 75 | install_requirements() { |
| 76 | + echo "Installing system requirements..." |
72 | 77 | yay -S --noconfirm --needed "${sys_requirements[@]}" |
73 | 78 |
|
74 | 79 | if [ "$XDG_SESSION_TYPE" = "wayland" ]; then |
| 80 | + echo "Installing Wayland session applications..." |
75 | 81 | yay -S --noconfirm --needed "${wayland_session_apps[@]}" |
76 | 82 | else |
| 83 | + echo "Installing X11 session applications..." |
77 | 84 | yay -S --noconfirm --needed "${x11_session_apps[@]}" |
78 | 85 | fi |
| 86 | + |
| 87 | + echo "All requirements have been installed successfully." |
79 | 88 | } |
80 | 89 |
|
81 | 90 | # Main function. |
82 | 91 | main() { |
| 92 | + echo "========================================================================================================" |
| 93 | + echo "Starting OCR4Linux setup..." |
| 94 | + echo "========================================================================================================" |
83 | 95 | check_yay |
| 96 | + echo "========================================================================================================" |
84 | 97 | install_requirements |
85 | | - |
| 98 | + echo "========================================================================================================" |
86 | 99 | # Copy the script to the user's home directory. |
| 100 | + echo "Setting up OCR4Linux configuration..." |
87 | 101 | mkdir -p "$HOME/.config/OCR4Linux" |
88 | 102 | cp -r ./* "$HOME/.config/OCR4Linux" |
| 103 | + echo "OCR4Linux has been set up successfully in $HOME/.config/OCR4Linux" |
| 104 | + echo "Setup completed. You can now use OCR4Linux." |
| 105 | + echo "========================================================================================================" |
89 | 106 | } |
90 | 107 |
|
91 | 108 | main |
0 commit comments