From cc91a5ea3e512e74a0b6fdf969e70203deff5fd3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 May 2017 22:11:29 +0100 Subject: [PATCH] improved exitcode --- lgsm/functions/command_update_linuxgsm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 372f3f860..a1afd048c 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -75,8 +75,8 @@ if [ -n "${functionsdir}" ]; then for functionfile in * do echo -ne " checking function ${functionfile}...\c" - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}";exitcode=$?)) - if [ "${exitcode}" -ne 0 ]; then + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + if [ $? -ne 0 ]; then fn_print_fail_eol_nl echo -ne " removing unknown function ${functionfile}...\c" fn_script_log_fatal "removing unknown function ${functionfile}"