Rewrite OR command into yaml condition

This commit is contained in:
flyingscorpio@pinebookpro 2021-07-28 19:19:21 +02:00
parent a8539bc9e8
commit acdf635b48

View file

@ -43,7 +43,8 @@ sudoers:
pacman.conf:
- run:
- "[ -e /etc/pacman.conf.backup ] || sudo cp /etc/pacman.conf /etc/pacman.conf.backup"
command: sudo cp /etc/pacman.conf /etc/pacman.conf.backup
condition: "[ ! -e /etc/pacman.conf.backup ]"
- run:
- sudo sed -i 's/#HookDir/HookDir/' /etc/pacman.conf &&
sudo sed -i 's/#Color/Color/' /etc/pacman.conf &&
@ -55,7 +56,8 @@ grub:
- install:
- grub-theme-vimix
- run:
- "[ -e /etc/default/grub.backup ] || sudo cp /etc/default/grub /etc/default/grub.backup"
command: sudo cp /etc/default/grub /etc/default/grub.backup
condition: "[ ! -e /etc/default/grub.backup ]"
- run:
- sudo sed -i -E 's/^#?GRUB_DEFAULT.+/GRUB_DEFAULT=saved/' /etc/default/grub &&
sudo sed -i -E 's@^#?GRUB_THEME.+@GRUB_THEME="/usr/share/grub/themes/Vimix/theme.txt"@' /etc/default/grub &&