From d6954323b650b730301ffb1bcc93d5c73b11e7c6 Mon Sep 17 00:00:00 2001 From: stojshic Date: Mon, 24 Jan 2022 18:22:21 +0100 Subject: [PATCH] Added option to choose AUR helper --- 2-user.sh | 22 ++++++++++++---------- startup.sh | 13 ++++++++++++- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/2-user.sh b/2-user.sh index 27dba51..23a101e 100755 --- a/2-user.sh +++ b/2-user.sh @@ -17,17 +17,19 @@ Installing AUR Softwares # You can solve users running this script as root with this and then doing the same for the next for statement. However I will leave this up to you. source $HOME/ArchTitus/setup.conf -cd ~ -git clone "https://aur.archlinux.org/yay.git" -cd ~/yay -makepkg -si --noconfirm -cd ~ -touch "~/.cache/zshhistory" -git clone "https://github.com/ChrisTitusTech/zsh" -git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k -ln -s "~/zsh/.zshrc" ~/.zshrc + cd ~ + touch "~/.cache/zshhistory" + git clone "https://github.com/ChrisTitusTech/zsh" + git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k + ln -s "~/zsh/.zshrc" ~/.zshrc -yay -S --noconfirm --needed - < ~/ArchTitus/pkg-files/aur-pkgs.txt +if [[ ! $AUR_HELPER == none ]]; then + cd ~ + git clone "https://aur.archlinux.org/$AUR_HELPER.git" + cd ~/$AUR_HELPER + makepkg -si --noconfirm + $AUR_HELPER -S --noconfirm --needed - < ~/ArchTitus/pkg-files/aur-pkgs.txt +fi export PATH=$PATH:~/.local/bin cp -r ~/ArchTitus/dotfiles/* ~/.config/ diff --git a/startup.sh b/startup.sh index 5ea082d..d0c4c23 100755 --- a/startup.sh +++ b/startup.sh @@ -269,6 +269,14 @@ done read -rep "Please enter your hostname: " nameofmachine set_option NAME_OF_MACHINE $nameofmachine } + +aurhelper () { + echo -ne "Please enter your desired AUR helper:" + options=(paru yay picaur aura trizen pacaur none) + select_option $? 4 "${options[@]}" + aur_helper=${options[$?]} + set_option AUR_HELPER $aur_helper +} # More features in future # language (){} @@ -278,6 +286,9 @@ logo userinfo clear logo +aurhelper +clear +logo diskpart clear logo @@ -287,4 +298,4 @@ logo timezone clear logo -keymap \ No newline at end of file +keymap