From 0b4393028393e619b373ab9d31f27587d28563be Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 23 Jan 2013 22:41:07 +0000 Subject: [PATCH] last fine tuning, now for specific irc support purposes, you can see what symbolic link started the real inxi --- inxi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inxi b/inxi index 95bf226..7a7fce6 100755 --- a/inxi +++ b/inxi @@ -2355,7 +2355,7 @@ show_options() print_version_info() { # if not in PATH could be either . or directory name, no slash starting - local script_path=$SCRIPT_PATH + local script_path=$SCRIPT_PATH script_symbolic_start='' if [[ $script_path == '.' ]];then script_path=$( pwd ) elif [[ -z $( grep '^/' <<< "$script_path" ) ]];then @@ -2364,6 +2364,7 @@ print_version_info() # 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/$SCRIPT_NAME ]];then + script_symbolic_start=$script_path/$SCRIPT_NAME script_path=$( readlink $script_path/$SCRIPT_NAME ) script_path=$( dirname $script_path ) fi @@ -2374,6 +2375,9 @@ print_version_info() if [[ $B_RUNNING_IN_SHELL == 'true' ]];then print_screen_output " " print_screen_output "Program Location: $script_path" + if [[ -n $script_symbolic_start ]];then + print_screen_output "Started via symbolic link: $script_symbolic_start" + fi print_screen_output "Website: http://inxi.goooglecode.com - IRC: irc.oftc.net channel: #smxi" print_screen_output "Forums: http://techpatterns.com/forums/forum-33.html" print_screen_output " "