From 048662311007b97683f8cf32f40fd37f8e492421 Mon Sep 17 00:00:00 2001 From: godalming123 Date: Sun, 16 Jan 2022 17:57:50 +0000 Subject: [PATCH 01/10] allow ability to select aur helper --- 2-user.sh | 21 +++++++++++++++++---- startup.sh | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/2-user.sh b/2-user.sh index 525ff07..6743999 100755 --- a/2-user.sh +++ b/2-user.sh @@ -18,10 +18,23 @@ Installing AUR Softwares source $HOME/ArchTitus/setup.conf cd ~ -git clone "https://aur.archlinux.org/yay.git" -cd ~/yay -makepkg -si --noconfirm -cd ~ +case $AURHELPER in + "1") + git clone "https://aur.archlinux.org/yay.git" + cd ~/yay + makepkg -si --noconfirm + cd ~ ;; + "2") + git clone "https://aur.archlinux.org/paru.git" + cd ~/paru + makepkg -si --noconfirm + cd ~ ;; + "3") + echo "" + echo "no aur helper selected" + echo "" +esac + touch "~/.cache/zshhistory" git clone "https://github.com/ChrisTitusTech/zsh" git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k diff --git a/startup.sh b/startup.sh index 1aa56bb..63fb03a 100644 --- a/startup.sh +++ b/startup.sh @@ -108,6 +108,17 @@ read -p "Your key boards layout:" keymap set_option KEYMAP $keymap } +aurHelper () { +echo -ne " +Pick your AUR helper: + 1) yay + 2) paru + 3) none +" +read -p "AUR helper:" aurHelper +set_option AURHELPER $aurHelper +} + drivessd () { echo -ne " Is this an ssd? yes/no: @@ -158,15 +169,23 @@ set_option nameofmachine $nameofmachine clear logo userinfo + +clear +logo +aurHelper + clear logo diskpart + clear logo filesystem + clear logo timezone + clear logo keymap \ No newline at end of file From 59d343d5b915b1a8dcd2261c27fd76e778c01c75 Mon Sep 17 00:00:00 2001 From: godalming123 Date: Mon, 17 Jan 2022 16:31:47 +0000 Subject: [PATCH 02/10] fix bug and check the field --- 2-user.sh | 32 ++++++++++++++------------------ startup.sh | 24 ++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/2-user.sh b/2-user.sh index 6743999..134df30 100755 --- a/2-user.sh +++ b/2-user.sh @@ -17,30 +17,26 @@ 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 ~ -case $AURHELPER in - "1") - git clone "https://aur.archlinux.org/yay.git" - cd ~/yay - makepkg -si --noconfirm - cd ~ ;; - "2") - git clone "https://aur.archlinux.org/paru.git" - cd ~/paru - makepkg -si --noconfirm - cd ~ ;; - "3") - echo "" - echo "no aur helper selected" - echo "" -esac +addAUR () { + cd ~ + git clone "https://aur.archlinux.org/$1.git" + cd ~/$1 + makepkg -si --noconfirm + cd ~ +} + +if [$AURHELPER -ne ""] then + addAUR $AURHELPER +fi 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 +for PACKADGE in $(cat ~/ArchTitus/pkg-files/aur-pkgs.txt) do + addAUR $PACKADGE +esac export PATH=$PATH:~/.local/bin cp -r ~/ArchTitus/dotfiles/* ~/.config/ diff --git a/startup.sh b/startup.sh index 63fb03a..c884860 100644 --- a/startup.sh +++ b/startup.sh @@ -113,10 +113,30 @@ echo -ne " Pick your AUR helper: 1) yay 2) paru + 3) other 3) none " -read -p "AUR helper:" aurHelper -set_option AURHELPER $aurHelper +read -p "AUR helper:" aurHelperNum +case aurHelperNum in + "1") + set_option AURHELPER "yay" + ;; + "2") + set_option AURHELPER "paru" + ;; + "3") + read -p "AUR helper (must be packadge in AUR):" aurHelper + set_option AURHELPER aurHelper + ;; + "4") + set_option aurHelper "" + ;; + *) + echo "" + echo "that is a invalid option" + echo "" + aurHelper + ;; } drivessd () { From e22a506ec3cc62d9f57bfe5ba4211533576416fb Mon Sep 17 00:00:00 2001 From: godalming123 Date: Mon, 17 Jan 2022 17:06:24 +0000 Subject: [PATCH 03/10] fix spelling issue --- 2-user.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-user.sh b/2-user.sh index 134df30..4e771bd 100755 --- a/2-user.sh +++ b/2-user.sh @@ -34,8 +34,8 @@ git clone "https://github.com/ChrisTitusTech/zsh" git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k ln -s "~/zsh/.zshrc" ~/.zshrc -for PACKADGE in $(cat ~/ArchTitus/pkg-files/aur-pkgs.txt) do - addAUR $PACKADGE +for PACKAGE in $(cat ~/ArchTitus/pkg-files/aur-pkgs.txt) do + addAUR $PACKAGE esac export PATH=$PATH:~/.local/bin From 6069ac689e0688597645b9bb28ca50ae4f27528e Mon Sep 17 00:00:00 2001 From: godalming123 Date: Tue, 18 Jan 2022 19:34:53 +0000 Subject: [PATCH 04/10] fix bug --- startup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startup.sh b/startup.sh index c884860..a62e6fa 100644 --- a/startup.sh +++ b/startup.sh @@ -137,7 +137,7 @@ case aurHelperNum in echo "" aurHelper ;; -} +esac drivessd () { echo -ne " @@ -208,4 +208,4 @@ timezone clear logo -keymap \ No newline at end of file +keymap From ff0dc59bdb6e4a3f07f62128b5542e9151f406c1 Mon Sep 17 00:00:00 2001 From: godalming123 Date: Tue, 18 Jan 2022 19:56:58 +0000 Subject: [PATCH 06/10] fix bug --- startup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/startup.sh b/startup.sh index a62e6fa..55c78b0 100644 --- a/startup.sh +++ b/startup.sh @@ -138,6 +138,7 @@ case aurHelperNum in aurHelper ;; esac +} drivessd () { echo -ne " From b58df0efa39a051102081d89b78b6b669e5193e4 Mon Sep 17 00:00:00 2001 From: godalming123 Date: Tue, 18 Jan 2022 19:59:07 +0000 Subject: [PATCH 07/10] improve --- startup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/startup.sh b/startup.sh index 55c78b0..0323ee7 100644 --- a/startup.sh +++ b/startup.sh @@ -114,7 +114,7 @@ Pick your AUR helper: 1) yay 2) paru 3) other - 3) none + 4) none " read -p "AUR helper:" aurHelperNum case aurHelperNum in @@ -125,7 +125,7 @@ case aurHelperNum in set_option AURHELPER "paru" ;; "3") - read -p "AUR helper (must be packadge in AUR):" aurHelper + read -p "AUR helper (must be packadge in AUR): " aurHelper set_option AURHELPER aurHelper ;; "4") @@ -134,7 +134,6 @@ case aurHelperNum in *) echo "" echo "that is a invalid option" - echo "" aurHelper ;; esac From e2b0472445d353c761d23f0713862aec7d71d372 Mon Sep 17 00:00:00 2001 From: godalming123 Date: Wed, 19 Jan 2022 16:35:32 +0000 Subject: [PATCH 08/10] fix aur helper bug --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 0323ee7..d9124bc 100644 --- a/startup.sh +++ b/startup.sh @@ -117,7 +117,7 @@ Pick your AUR helper: 4) none " read -p "AUR helper:" aurHelperNum -case aurHelperNum in +case $aurHelperNum in "1") set_option AURHELPER "yay" ;; From f0689b3ef392c8d1807c0b0a897e24b50f7a1145 Mon Sep 17 00:00:00 2001 From: godalming123 Date: Wed, 19 Jan 2022 17:00:35 +0000 Subject: [PATCH 09/10] add space --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index d9124bc..cdd1659 100644 --- a/startup.sh +++ b/startup.sh @@ -116,7 +116,7 @@ Pick your AUR helper: 3) other 4) none " -read -p "AUR helper:" aurHelperNum +read -p "AUR helper: " aurHelperNum case $aurHelperNum in "1") set_option AURHELPER "yay" From 681f14c9d459f6592432b4cc6c9f4b90763c2481 Mon Sep 17 00:00:00 2001 From: godalming123 Date: Wed, 19 Jan 2022 18:15:30 +0000 Subject: [PATCH 10/10] fix bugs --- 2-user.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-user.sh b/2-user.sh index 4e771bd..1d7b8a9 100755 --- a/2-user.sh +++ b/2-user.sh @@ -25,8 +25,8 @@ addAUR () { cd ~ } -if [$AURHELPER -ne ""] then - addAUR $AURHELPER +if [${AURHELPER} -ne ""] then + addAUR ${AURHELPER} fi touch "~/.cache/zshhistory"