paru: Fix installation

This commit is contained in:
2020-12-20 20:37:43 +01:00
parent d84405aa6f
commit a0a9a34aa9

View File

@@ -127,13 +127,24 @@
shell: /bin/bash
system: true
- name: build paru on arch
- name: check if paru is already installed
shell: |
set -o errexit
if pacman -Qi paru >/dev/null 2>&1; then
exit 100
fi
exit 0
args:
executable: /bin/bash
changed_when: false
check_mode: false
failed_when: result.rc not in (0, 100)
register: result
- name: build paru on arch
shell: |
set -o errexit
mkdir -p /tmp/paru-build
cd /tmp/paru-build
@@ -144,11 +155,9 @@
makepkg
args:
executable: /bin/bash
register: result
become: true # do not build as root!
become_user: makepkg
changed_when: result.rc != 100
failed_when: result.rc not in (0, 100)
when: result.rc != 100
- name: install paru
shell: |