From 66d7f022071a7739d1d1781d354ac147e287db81 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 23 Jan 2013 22:35:10 +0000 Subject: [PATCH] small bug fix with symbolic link path detection for --version --- inxi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inxi b/inxi index fa5293e..95bf226 100755 --- a/inxi +++ b/inxi @@ -2363,8 +2363,9 @@ print_version_info() fi # handle if it's a symbolic link, rare, but can happen with script directories in irc clients # which would only matter if user starts inxi with -! 30 override in irc client - if [[ -L $script_path ]];then - script_path=$( readlink $script_path ) + if [[ -L $script_path/$SCRIPT_NAME ]];then + script_path=$( readlink $script_path/$SCRIPT_NAME ) + script_path=$( dirname $script_path ) fi local last_modified=$( grep -m 1 '^#### Date:' $SCRIPT_PATH/$SCRIPT_NAME | gawk -F ': ' '{print $NF}' ) local year_modified=$( gawk '{print $NF}' <<< "$last_modified" )