Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Commit

Permalink
Fixes by me0wing-katt0 (#1)
Browse files Browse the repository at this point in the history
- Fix the indentation in the `case` statement
- Fix the appending to pacman.conf if reran
- General patches
  • Loading branch information
RaptaG authored Jun 15, 2022
2 parents 4478f39 + e76b501 commit 3d1348f
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions CAAIS.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Made by RaptaG, for your peace of mind :)
echo "CAAIS, version 1.0 (by RaptaG)"
# Made by RaptaG and me0wing-katt0, for your peace of mind :)
echo "CAAIS, version 1.1 (by RaptaG and me0wing-katt0)"

# Root permission checker
if [ $EUID -ne 0 ]; then
Expand All @@ -10,7 +10,7 @@ if [ $EUID -ne 0 ]; then
fi

# Installing keys
echo "Installing the chaotic-aur keys..."
echo "Installing the Chaotic-AUR keys..."
pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com
pacman-key --lsign-key FBA220DFC880C036

Expand All @@ -20,12 +20,17 @@ pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst
echo "Downloading the mirrorlist..."
pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'

# Adapting the Chaotic-AUR mirrorlist
echo "Adapting the mirrorlist..."
# Checking if Chaotic-AUR is already appended in pacman.conf, if not exit
echo "Appending Chaotic-AUR to the mirrorlist..."
cd /etc/
echo -e "\r\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist" >> pacman.conf
if ! grep "chaotic-aur" /etc/pacman.conf; then
echo -e "\r\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist" >> pacman.conf
else
echo "chaotic AUR is already added, exiting..."
exit 1
fi

# Refreshing mirrorlist
# Refreshing the mirrorlist
echo "Refreshing the mirrorlists..."
echo -n "Doing this is needed for Chaotic-AUR to work but will also cause a system upgrade. Do you wish to continue? [Y/n] "
read answer
Expand All @@ -37,11 +42,11 @@ case "$answer" in
pacman -Syu
;;
*)
echo " You'll now have to refresh the mirrorlists manually, using the sudo pacman -Syu command"
echo " You'll now have to refresh the mirrorlists manually, by running 'sudo pacman -Syu'"
echo "Exiting..."
exit
exit
;;
esac
echo "Done! Now Chaotic-AUR should be installed and working in your system!"
echo "Exiting..."
exit
exit

0 comments on commit 3d1348f

Please sign in to comment.