Skip to content

Commit

Permalink
automatic downgrades is now possible
Browse files Browse the repository at this point in the history
  • Loading branch information
excalibur1234 committed Jan 27, 2018
1 parent 98c006d commit d36fbe6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pacui
Original file line number Diff line number Diff line change
Expand Up @@ -1372,13 +1372,20 @@ function func_c
then
# the sudoers file should never be edited directly! if something goes wrong, sudo stops working. instead, visudo should be used. this is much safer.
sudo EDITOR=nano visudo
elif [[ "$file" == "/etc/pacman.d/mirrorlist" ]] || [[ "$file" == "/etc/pacman-mirrors.conf" ]] || [[ "$file" == "/etc/pacman.conf" ]]
elif [[ "$file" == "/etc/pacman.d/mirrorlist" ]] || [[ "$file" == "/etc/pacman.conf" ]]
then
# if $EDITOR variable does not exist, set it to 'nano'
[[ -z "$EDITOR" ]] && EDITOR='nano'
# open "file" in "EDITOR": (attention: "$file" (including " symbols) does NOT WORK!!!)
sudo $EDITOR "$file"
sudo pacman -Syyuu # apply changes
elif [[ "$file" == "/etc/pacman-mirrors.conf" ]]
then
# if $EDITOR variable does not exist, set it to 'nano'
[[ -z "$EDITOR" ]] && EDITOR='nano'
# open "file" in "EDITOR": (attention: "$file" (including " symbols) does NOT WORK!!!)
sudo $EDITOR "$file"
sudo pacman-mirrors -f 0 && sudo pacman -Syyuu
elif [[ "$file" == "/etc/fstab" ]] || [[ "$file" == "/etc/crypttab" ]]
then
# if $EDITOR variable does not exist, set it to 'nano'
Expand Down

0 comments on commit d36fbe6

Please sign in to comment.