From 745254777ac830f9cb41edee58bb73ca569a3261 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 18 Oct 2016 18:16:39 +0200 Subject: [PATCH] more elegant execname --- lgsm/functions/check_permissions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 946ddd301..d085b5ef3 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -83,7 +83,7 @@ fn_check_permissions(){ fi # Check if executable is executable and attempt to fix it # First get executable name - execname="$(echo "${executable}" | awk -F "/" '{ print $2 }')" + execname="$(basename "${executable}" if [ -f "${executabledir}/${execname}" ]; then # Get permission numbers on file under the form 775 execperm="$(stat -c %a "${executabledir}/${execname}")"