Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions tabs/common-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,32 @@ checkAURHelper() {
fi
done

echo "Installing yay as AUR helper..."
echo "Pick which AUR Helper you would like to install."
printf "(1) Yay (2) Paru (1/2): " # Printf here to handle new lines
read -r choice
case "$choice" in
1)
AUR_HELPER="yay"
echo "Installing yay as AUR helper..."
;;
2)
AUR_HELPER="paru"
echo "Installing paru as AUR helper..."
;;
*)
printf "%b\n" "${RED}Invalid choice.${RC}"
exit 1
;;
esac

$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel
cd /opt && $ESCALATION_TOOL git clone https://aur.archlinux.org/yay-git.git && $ESCALATION_TOOL chown -R "$USER":"$USER" ./yay-git
cd yay-git && makepkg --noconfirm -si
cd /opt && $ESCALATION_TOOL git clone "https://aur.archlinux.org/${AUR_HELPER}-bin.git" && $ESCALATION_TOOL chown -R "$USER":"$USER" "./${AUR_HELPER}-bin"
cd "${AUR_HELPER}-bin" && makepkg --noconfirm -si

if command_exists yay; then
AUR_HELPER="yay"
if command_exists "$AUR_HELPER"; then
AUR_HELPER_CHECKED=true
else
echo -e "${RED}Failed to install AUR helper.${RC}"
printf "%b\n" "${RED}Failed to install AUR helper.${RC}"
exit 1
fi
fi
Expand Down
7 changes: 7 additions & 0 deletions tabs/system-setup/arch/aurhelper-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh -e

. ../../common-script.sh

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert functionality could be added inside of this script. Check out #384

checkEnv
checkEscalationTool
checkAURHelper
26 changes: 0 additions & 26 deletions tabs/system-setup/arch/paru-setup.sh

This file was deleted.

26 changes: 0 additions & 26 deletions tabs/system-setup/arch/yay-setup.sh

This file was deleted.

8 changes: 2 additions & 6 deletions tabs/system-setup/tab_data.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ name = "Arch Server Setup"
script = "arch/server-setup.sh"

[[data.entries]]
name = "Paru AUR Helper"
script = "arch/paru-setup.sh"

[[data.entries]]
name = "Yay AUR Helper"
script = "arch/yay-setup.sh"
name = "AUR Helper setup"
script = "arch/aurhelper-setup.sh"

[[data]]
name = "Fedora"
Expand Down