From 6a733861b03150f5507601a6acb8afdacd678811 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Wed, 28 Apr 2021 17:52:56 +0200 Subject: [PATCH] TT#120752 Fix b821e00: move main function load close to validation It produces no functional changes but align code better with Sipwise/ngcpcfg style. We normally check the file availability and load the file the next line. Change-Id: Ifebddc452f7701fd02a85a8d3273edc89b7fd21a --- scripts/edit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/edit b/scripts/edit index 8943b690..495c8bf3 100755 --- a/scripts/edit +++ b/scripts/edit @@ -14,6 +14,9 @@ if ! [ -r "${FUNCTIONS}"/main ] ; then exit 1 fi +# shellcheck disable=SC1090 +. "${FUNCTIONS}"/main + if [ -z "${EDITOR:-}" ] ; then if [ -x "/usr/bin/vim" ]; then EDITOR="/usr/bin/vim" @@ -23,9 +26,6 @@ if [ -z "${EDITOR:-}" ] ; then fi fi -# shellcheck disable=SC1090 -. "${FUNCTIONS}"/main - # main script RC=0 file=""