#!/usr/bin/env bash updatePackages() { noconfirm= if [[ $1 == "-y" ]]; then noconfirm="--no-confirm"; fi executeAndNotify "doUpdatePackages $noconfirm" "packages updated" "package update failed"; } doUpdatePackages() { pamac update $1; pamac remove --orphans --cascade $1; }