aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh90
1 files changed, 53 insertions, 37 deletions
diff --git a/install.sh b/install.sh
index a39c922..259a765 100755
--- a/install.sh
+++ b/install.sh
@@ -174,6 +174,19 @@ else
gum_to_array GPU_PKGS < <(choose_packages pkg_gpu)
fi
+##################
+## AUR PACKAGES ##
+##################
+source "$currentDir/packages/pkg_aur.sh"
+prompt_style "Select AUR packages"
+
+if ((AUTO_YES)); then
+ AUR_PKGS=("${pkg_aur[@]}")
+else
+ gum_to_array AUR_PKGS < <(choose_packages pkg_aur)
+fi
+
+
##########################
## Configure Everything ##
@@ -237,44 +250,8 @@ else
exit 1
fi
-##################
-## AUR PACKAGES ##
-##################
-source "$currentDir/packages/pkg_aur.sh"
-prompt_style "Select AUR packages"
-
-if ((AUTO_YES)); then
- AUR_PKGS=("${pkg_aur[@]}")
-else
- gum_to_array AUR_PKGS < <(choose_packages pkg_aur)
-fi
-
-if ((${#AUR_PKGS[@]})); then
- if ! command -v paru >/dev/null 2>&1; then
- log INFO "Installing Paru (AUR package manager)"
- git clone https://aur.archlinux.org/paru.git
- (cd paru && makepkg -sri)
- rm -rf paru
- fi
- paru -S --needed "${AUR_PKGS[@]}"
-else
- log WARN "No AUR packages selected"
-fi
-############################
-## Setup Keyd ##
-############################
-if command -v keyd >/dev/null 2>&1; then
- if confirm "Configure and enable keyd? "; then
- log INFO "Copying keyd configuration to /etc/keyd/default.conf"
- sudo cp "$currentDir/system/etc/keyd/default.conf" /etc/keyd/
- sudo systemctl enable --now keyd.service \
- && log SUCCESS "Successfully enabled keyd.service" \
- || log ERROR "Couldn't enable keyd.service"
- fi
-fi
-
########################
## Install Everything ##
########################
@@ -284,13 +261,23 @@ ALL_PKGS=(
"${OPTIONAL_PKGS[@]}"
"${GPU_PKGS[@]}"
"${UTILITY_PKGS[@]}"
+ "${AUR_PKGS[@]}"
"${pkg_desktop[@]}"
)
if ((${#ALL_PKGS[@]})); then
if confirm "Install all the selected packages?"; then
log INFO "Installing selected packages..."
- if sudo pacman -Syu --needed "${ALL_PKGS[@]}"; then
+
+ ## Installing paru if not installed already
+ if ! command -v paru >/dev/null 2>&1; then
+ log INFO "Installing Paru (AUR package manager)"
+ git clone https://aur.archlinux.org/paru.git
+ (cd paru && makepkg -sri)
+ rm -rf paru
+ fi
+
+ if paru -Syu --needed "${ALL_PKGS[@]}"; then
INSTALL_STATUS="complete"
else
INSTALL_STATUS="failed"
@@ -305,6 +292,35 @@ else
fi
+##########################
+## Install AUR Packages ##
+##########################
+if ((${#AUR_PKGS[@]})); then
+ if ! command -v paru >/dev/null 2>&1; then
+ log INFO "Installing Paru (AUR package manager)"
+ git clone https://aur.archlinux.org/paru.git
+ (cd paru && makepkg -sri)
+ rm -rf paru
+ fi
+ paru -S --needed "${AUR_PKGS[@]}"
+else
+ log WARN "No AUR packages selected"
+fi
+
+################
+## Setup Keyd ##
+################
+if command -v keyd >/dev/null 2>&1; then
+ if confirm "Configure and enable keyd? "; then
+ log INFO "Copying keyd configuration to /etc/keyd/default.conf"
+ sudo cp "$currentDir/system/etc/keyd/default.conf" /etc/keyd/
+ sudo systemctl enable --now keyd.service \
+ && log SUCCESS "Successfully enabled keyd.service" \
+ || log ERROR "Couldn't enable keyd.service"
+ fi
+fi
+
+
case "$INSTALL_STATUS" in
complete)
gum style \