From 9815f6e3e1f7886f8655409dbdd756ab35a8f11f Mon Sep 17 00:00:00 2001 From: Matias Barcenas Date: Mon, 1 Jan 2018 00:56:55 -0600 Subject: [PATCH] Fixed path-related diagnostics bug. --- scripts/diagnostics.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/diagnostics.sh b/scripts/diagnostics.sh index 51da371..4439d5f 100755 --- a/scripts/diagnostics.sh +++ b/scripts/diagnostics.sh @@ -13,7 +13,10 @@ if [ ! "$1" ]; then fi echo "[ FLUXION Info ]" -declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" fluxion.sh)) +if [ -f "./fluxion.sh" ] + then declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" fluxion.sh)) + else declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" ../fluxion.sh)) +fi echo "FLUXION V${FLUXIONInfo[0]/*=/}.${FLUXIONInfo[1]/*=/}" echo -ne "\n\n"