Skip to content

Commit

Permalink
- rename state-update-available
Browse files Browse the repository at this point in the history
  • Loading branch information
trigg committed May 7, 2024
1 parent bd164de commit 1577997
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ state_checking() {
echo "${name}_checking" > "${statedir}/current_state"
}

# Definition of the state_update_available function: Change state to "updates-available"
state_update_available() {
# Definition of the state_updates_available function: Change state to "updates-available"
state_updates_available() {
echo "${name}_updates-available" > "${statedir}/current_state"
}

Expand Down Expand Up @@ -233,7 +233,7 @@ check() {
fi

if [ -n "${update_available}" ]; then
state_update_available
state_updates_available

if [ -n "${notif}" ]; then
if ! diff "${statedir}/current_updates_check" "${statedir}/last_updates_check" &> /dev/null; then
Expand Down Expand Up @@ -310,7 +310,7 @@ list_packages() {
exit 7
fi
else
state_update_available
state_updates_available
if [ -z "${list_option}" ]; then
ask_msg "$(eval_gettext "Proceed with update? [Y/n]")"

Expand Down Expand Up @@ -400,7 +400,7 @@ update() {
main_msg "$(eval_gettext "Updating Packages...\n")"

if ! "${su_cmd}" pacman --color "${pacman_color_opt}" -Syu; then
state_update_available
state_updates_available
echo
error_msg "$(eval_gettext "An error has occurred during the update process\nThe update has been aborted\n")" && quit_msg
exit 5
Expand All @@ -412,7 +412,7 @@ update() {
main_msg "$(eval_gettext "Updating AUR Packages...\n")"

if ! "${aur_helper}" --color "${pacman_color_opt}" "${devel_flag[@]}" -Syu; then
state_update_available
state_updates_available
echo
error_msg "$(eval_gettext "An error has occurred during the update process\nThe update has been aborted\n")" && quit_msg
exit 5
Expand All @@ -424,7 +424,7 @@ update() {
main_msg "$(eval_gettext "Updating Flatpak Packages...\n")"

if ! flatpak update; then
state_update_available
state_updates_available
error_msg "$(eval_gettext "An error has occurred during the update process\nThe update has been aborted\n")" && quit_msg
exit 5
fi
Expand Down

0 comments on commit 1577997

Please sign in to comment.