Fix update
for Flatpak. (#8)
* Change to 2 spaced indent. * Change flatpak to never "fail" so that update can be run on servers as well. * Change indent to 2 spaces. * Be fancier than an always-true.
This commit is contained in:
parent
37c5b122f8
commit
89961ad08f
@ -71,17 +71,24 @@
|
||||
parrot_mirrors_suck=true
|
||||
sudo apt update --fix-missing
|
||||
fi
|
||||
done
|
||||
done &&
|
||||
when: ansible_distribution == "Parrot OS"
|
||||
|
||||
- name: General | Facts | Package | Update Commands | flatpak (Linux)
|
||||
|
||||
- name: General | Facts | Package | Update Commands | flatpak | check
|
||||
shell: which flatpak
|
||||
register: flatpak_exec
|
||||
ignore_errors: yes
|
||||
|
||||
- name: General | Facts | Package | Update Commands | flatpak | exists
|
||||
set_fact:
|
||||
update_flatpak: |
|
||||
echo "*** Flatpak ***" &&
|
||||
flatpak update &&
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
- name: General | Facts | Package | Update Commands | flatpak (FreeBSD)
|
||||
echo "*** Flatpak ***" &&
|
||||
flatpak update {{ update_accept_var }} &&
|
||||
when: flatpak_exec is defined and flatpak_exec.failed is defined and not flatpak_exec.failed
|
||||
|
||||
- name: General | Facts | Package | Update Commands | flatpak | not exists
|
||||
set_fact:
|
||||
update_flatpak: echo "*** No Flatpak ***"
|
||||
when: ansible_system == "FreeBSD"
|
||||
update_flatpak: |
|
||||
echo "*** Flatpak Not Installed ***" &&
|
||||
when: update_flatpak is not defined
|
||||
|
@ -120,8 +120,8 @@
|
||||
PROG=$FUNCNAME
|
||||
usage="Usage: $PROG [-y]
|
||||
$PROG is used to run all the system's package manager commands
|
||||
in one swoop. Flow stops if any command returns a failure code.
|
||||
The hope is to run something as easy as 'pacman -Syyu'.
|
||||
in one swoop. Flow stops if any command returns a failure code.
|
||||
The hope is to run something as easy as 'pacman -Syyu'.
|
||||
-y : Assume yes to any prompts."
|
||||
|
||||
unset OPTIND
|
||||
@ -140,7 +140,7 @@
|
||||
{{ update_flatpak }}
|
||||
return 0
|
||||
|
||||
echo "$PROG experienced a problem and has aborted."
|
||||
echo "ERROR: $PROG experienced a problem and has aborted."
|
||||
return 1
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
# Use a specific branch if it was asked for.
|
||||
branch="dev"
|
||||
if [[ $1 != "" ]]; then
|
||||
branch="$1"
|
||||
branch="$1"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
# Use a specific branch if it was asked for.
|
||||
branch="dev"
|
||||
if [[ $1 != "" ]]; then
|
||||
branch="$1"
|
||||
branch="$1"
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user