Skip to content
Snippets Groups Projects
Commit cf920b20 authored by Meisam Farzalipour Tabriz's avatar Meisam Farzalipour Tabriz
Browse files

fix scripts format

parent 816653a5
No related branches found
No related tags found
No related merge requests found
Pipeline #259064 passed
...@@ -13,20 +13,17 @@ ...@@ -13,20 +13,17 @@
# You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. # You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
# ======================================================================================================================================= # =======================================================================================================================================
_version="0.5" _version="0.5"
_requirements=('dnf-automatic' 'tail' 'sed') _requirements=('dnf-automatic' 'tail' 'sed')
declare -A _exit_code declare -A _exit_code
_exit_code[OK]="0" _exit_code[OK]="0"
_exit_code[WARNING]="1" _exit_code[WARNING]="1"
_exit_code[CRITICAL]="2" _exit_code[CRITICAL]="2"
_exit_code[UNKNOWN]="3" _exit_code[UNKNOWN]="3"
print_help() print_help() {
{
printf '%s\n' "This script checks the status of dnf-automatic." printf '%s\n' "This script checks the status of dnf-automatic."
printf 'Usage: %s [--only-security] [--version] [-h|--help]\n' "$0" printf 'Usage: %s [--only-security] [--version] [-h|--help]\n' "$0"
printf '\t%s\n' "--only-security: Do not issue a warning for non-security updates" printf '\t%s\n' "--only-security: Do not issue a warning for non-security updates"
...@@ -34,10 +31,8 @@ print_help() ...@@ -34,10 +31,8 @@ print_help()
printf '\t%s\n' "-h, --help: Print help (this text!)" printf '\t%s\n' "-h, --help: Print help (this text!)"
} }
parse_commandline() parse_commandline() {
{ while test $# -gt 0; do
while test $# -gt 0
do
_key="$1" _key="$1"
case "$_key" in case "$_key" in
--only-security) --only-security)
... ...
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
# dnf-automatic-mock --updates-available # dnf-automatic-mock --updates-available
# dnf-automatic-mock --no-updates # dnf-automatic-mock --no-updates
_output_type="$1" _output_type="$1"
_test_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd) _test_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment