Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Removed the AlwaysShowNews option #288

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ Les options prises en charge sont :

- NoColor # Ne pas coloriser la sortie.
- NoVersion # Ne pas afficher les modifications de versions des paquets lors du listing des mises à jour en attente (y compris lors de l'utilisation de l'option `-l / --list`).
- AlwaysShowNews # Toujours afficher les Arch news avant de mettre à jour, peu importe s'il y en a une nouvelle depuis la dernière exécution ou non.
- NewsNum=[Num] # Nombre de Arch news à affcher avant la mise à jour et avec l'option `-n / --news` (voir la page de manuel arch-update(1) pour plus de details). La valeur par défaut est 5.
- AURHelper=[AUR Helper] # AUR helper à utiliser pour la prise en charge des paquets AUR. Les valeurs valides sont `paru`, `yay` ou `pikaur`. Si cette option n'est pas spécifiée, Arch-Update utilisera le premier AUR helper disponible dans l'ordre suivant : `paru` puis `yay` puis `pikaur` (si aucun d'eux n'est installé, Arch-Update ne prendra pas en compte les paquets AUR).
- PrivilegeElevationCommand=[Cmd] # Commande à utiliser pour l'élévation de privilège. Les valeurs valides sont `sudo`, `doas` ou `run0`. Si cette option n'est pas spécifiée, Arch-Update utilisera la première commande disponible dans l'odre suivant : `sudo`, `doas` puis `run0`.
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ The supported options are:

- NoColor # Do not colorize output.
- NoVersion # Do not show versions changes for packages when listing pending updates (including when using the `-l / --list` option).
- AlwaysShowNews # Always display Arch news before updating, regardless of whether there's a new one since the last run or not.
- NewsNum=[Num] # Number of Arch news to display before updating and with the `-n / --news` option (see the arch-update(1) man page for more details). Defaults to 5.
- AURHelper=[AUR Helper] # AUR helper to be used for AUR packages support. Valid values are `paru`, `yay` or `pikaur`. If this option is not set, Arch-Update will use the first available AUR helper in the following order: `paru` then `yay` then `pikaur` (in case none of them is installed, Arch-Update will not take AUR packages into account).
- PrivilegeElevationCommand=[Cmd] # Command to be used for privilege elevation. Valid values are `sudo`, `doas` or `run0`. If this option is not set, Arch-Update will use the first available command in the following order: `sudo`, `doas` then `run0`.
Expand Down
4 changes: 0 additions & 4 deletions doc/man/arch-update.conf.5
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ Do not colorize output.
.B NoVersion
.RB "Do not show versions changes for packages when listing pending updates (including when using the " "-l / --list " "option, see the " "arch-update(1) " "man page for more details)."

.TP
.B AlwaysShowNews
Always display Arch news before updating, regardless of whether there's a new one since the last run or not.

.TP
.B NewsNum=[Num]
.RB "Number of Arch news to display before updating and with the " "-n / --news " "option (see the " "arch-update(1) " "man page for more details). Defaults to 5."
Expand Down
4 changes: 0 additions & 4 deletions doc/man/fr/arch-update.conf.5
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ Ne pas coloriser la sortie.
.B NoVersion
.RB "Ne pas afficher les modifications de versions des paquets lors du listing des mises à jour en attente (y compris lors de l'utilisation de l'option " "-l / --list" ", voir la page de man " "arch-update(1) " "pour plus de détails)."

.TP
.B AlwaysShowNews
Toujours afficher les Arch news avant de mettre à jour, peu importe s'il y en a une nouvelle depuis la dernière exécution ou non.

.TP
.B NewsNum=[Num]
.RB "Nombre de Arch news à afficher avant la mise à jour et avec l'option " "-n / --news " "(voir la page de man " "arch-update(1) " "pour plus de détails). La valeur par défaut est 5."
Expand Down
1 change: 0 additions & 1 deletion res/config/arch-update.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#NoColor
#NoVersion
#AlwaysShowNews
#NewsNum=5
#AURHelper=paru
#PrivilegeElevationCommand=sudo
Expand Down
4 changes: 0 additions & 4 deletions src/lib/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ if [ -f "${config_file}" ]; then
# shellcheck disable=SC2034
no_version=$(grep -Eq '^[[:space:]]*NoVersion[[:space:]]*$' "${config_file}" 2> /dev/null && echo "true")

# Check the "AlwaysShowNews" option in arch-update.conf
# shellcheck disable=SC2034
show_news=$(grep -Eq '^[[:space:]]*AlwaysShowNews[[:space:]]*$' "${config_file}" 2> /dev/null && echo "true")

# Check the "NewsNum" option in arch-update.conf
# shellcheck disable=SC2034
news_num=$(grep -E '^[[:space:]]*NewsNum[[:space:]]*=[[:space:]]*[1-9][0-9]*[[:space:]]*$' "${config_file}" 2> /dev/null | awk -F '=' '{print $2}' | tr -d '[:space:]')
Expand Down