mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
small glitch fix, very obscure case so checking --version path as symbolic link, use readlink if it is one.
This commit is contained in:
parent
b31926900b
commit
9d0661b197
5
inxi
5
inxi
|
@ -2361,6 +2361,11 @@ print_version_info()
|
||||||
elif [[ -z $( grep '^/' <<< "$script_path" ) ]];then
|
elif [[ -z $( grep '^/' <<< "$script_path" ) ]];then
|
||||||
script_path="$( pwd )/$script_path"
|
script_path="$( pwd )/$script_path"
|
||||||
fi
|
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 last_modified=$( grep -m 1 '^#### Date:' $SCRIPT_PATH/$SCRIPT_NAME | gawk -F ': ' '{print $NF}' )
|
||||||
local year_modified=$( gawk '{print $NF}' <<< "$last_modified" )
|
local year_modified=$( gawk '{print $NF}' <<< "$last_modified" )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue