From 558af1306734d68885426e89a5de343b72302e11 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 1 Feb 2023 03:37:57 +0200 Subject: Reverse if statement to avoid else --- bin/profile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/profile b/bin/profile index 0d0025d..8c32695 100644 --- a/bin/profile +++ b/bin/profile @@ -180,13 +180,12 @@ EOF exit 2 fi pack_z_block "profile/add" data - if [ $? == 0 ] + if [ "$?" -ne 0 ] then - echo "Profile added successfully" - else echo "error??" exit 1 fi + echo "Profile added successfully" } usage(){ echo "Usage:" -- cgit v1.2.3