From 9d0661b1974e97e3418b0d9c96529e24dcf0183b Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 23 Jan 2013 22:30:42 +0000 Subject: [PATCH] small glitch fix, very obscure case so checking --version path as symbolic link, use readlink if it is one. --- inxi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inxi b/inxi index de7767d..fa5293e 100755 --- a/inxi +++ b/inxi @@ -2361,6 +2361,11 @@ print_version_info() elif [[ -z $( grep '^/' <<< "$script_path" ) ]];then script_path="$( pwd )/$script_path" 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 ) + fi local last_modified=$( grep -m 1 '^#### Date:' $SCRIPT_PATH/$SCRIPT_NAME | gawk -F ': ' '{print $NF}' ) local year_modified=$( gawk '{print $NF}' <<< "$last_modified" )