From 9a538fc71568ed2831d7b8f32dac82230a84c42f Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Mon, 26 Feb 2024 19:58:37 -0300 Subject: [PATCH] Save lines when checking for binaries in download-translations --- download-translations | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/download-translations b/download-translations index 1ea10f0ec..4d64e4b8f 100755 --- a/download-translations +++ b/download-translations @@ -30,27 +30,20 @@ warn_msg() { } # check for 'diff' program -diff --version 2>/dev/null >/dev/null -if [ $? -ne 0 ]; then - err_msg "==== You must have the 'diff' program installed for this script ====" -fi +diff --version 2>/dev/null >/dev/null || \ + err_msg "You must have the 'diff' program installed for this script." # check for 'wget' program -wget --version 2>/dev/null >/dev/null -if [ $? -ne 0 ]; then - err_msg "==== You must have the 'wget' program installed for this script ====" -fi +wget --version 2>/dev/null >/dev/null || \ + err_msg "You must have the 'wget' program installed for this script." # check for 'msguniq' program -msguniq --version 2>/dev/null >/dev/null -if [ $? -ne 0 ]; then - err_msg "==== You must have the 'gettext' package installed for this script ====" -fi +msguniq --version 2>/dev/null >/dev/null || \ + err_msg "You must have the 'gettext' package installed for this script." # make sure we're in the top-level directory -if [ ! -d ./po ]; then - err_msg "==== No ./po directory in the current working directory ====" -fi +[ -d ./po ] || \ + err_msg "No ./po directory in the current working directory." DOMAIN="buzztrax"