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

Commit

Permalink
Version 1.6
Browse files Browse the repository at this point in the history
- Fix #3 (?)
- Various other fixes

(PS: The next version is going to include the option to remove Chaotic-AUR!)
  • Loading branch information
RaptaG authored Jul 15, 2022
1 parent 526183b commit d397c27
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CAAIS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
set -e

# Definitions
ver='1.5'
fname="$(basename $0)"
ver=1.6
fname=$(basename $0)

caais-exit() {
echo 'Exiting...'
exit "$1"
}

# Starting message
echo 'CAAIS, version $ver (by RaptaG, terminalmaid and TruncatedDinosour)'
echo "CAAIS, version $ver (by RaptaG, terminalmaid and TruncatedDinosour)"

# Root permission checker
if [ "$EUID" -ne 0 ]; then
echo -e 'Error: Root permissions are required for $fname to work.\nPlease run: sudo ./$fname'
echo -e "Error: Root permissions are required for $fname to work.\nPlease run: sudo ./$fname"
caais-exit 1
fi

Expand All @@ -38,7 +38,7 @@ caais() {
echo 'Appending Chaotic-AUR to the mirrorlist...'
appendInPacmanConf=$(grep 'chaotic-aur' /etc/pacman.conf)

if [ $appendInPacmanConf -eq 0 ]; then
if [ $appendInPacmanConf == "[chaotic-aur]" ]; then
echo 'Chaotic-AUR is already append in pacman.conf, skipping...'
else
echo -e '\r\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist' >> /etc/pacman.conf
Expand Down

0 comments on commit d397c27

Please sign in to comment.