diff --git a/inxi b/inxi index 1cc58ca..a738129 100755 --- a/inxi +++ b/inxi @@ -415,6 +415,7 @@ LOG_FILE="$SCRIPT_DATA_DIR/inxi.log" LOG_FILE_1="$SCRIPT_DATA_DIR/inxi.1.log" LOG_FILE_2="$SCRIPT_DATA_DIR/inxi.2.log" MAN_FILE_DOWNLOAD='http://inxi.googlecode.com/svn/trunk/inxi.8.gz' +MAN_FILE_LOCATION='/usr/share/man/man8' SCRIPT_NAME="inxi" SCRIPT_PATCH_NUMBER='' SCRIPT_PATH="" #filled-in in Main @@ -1252,7 +1253,7 @@ script_self_updater() { eval $LOGFS local wget_error=0 file_contents='' wget_man_error=0 - local man_location='/usr/share/man/man8' + print_screen_output "Starting $SCRIPT_NAME self updater." print_screen_output "Currently running $SCRIPT_NAME version number: $SCRIPT_VERSION_NUMBER" print_screen_output "Current version patch number: $SCRIPT_PATCH_NUMBER" @@ -1272,8 +1273,8 @@ script_self_updater() print_screen_output "To run the new version, just start $SCRIPT_NAME again." print_screen_output "----------------------------------------" print_screen_output "Starting download of man page file now." - if [[ ! -d $man_location ]];then - print_screen_output "The required man directory was not detected on your system, unable to continue: $man_location" + if [[ ! -d $MAN_FILE_LOCATION ]];then + print_screen_output "The required man directory was not detected on your system, unable to continue: $MAN_FILE_LOCATION" else if [[ $B_ROOT == 'true' ]];then print_screen_output "Checking Man page download URL..." @@ -1281,10 +1282,10 @@ script_self_updater() if [[ $wget_man_error -eq 0 ]];then print_screen_output "Man file download URL verified: $MAN_FILE_DOWNLOAD" print_screen_output "Downloading Man page file now." - wget -O $man_location $MAN_FILE_DOWNLOAD || wget_man_error=$? + wget -O $MAN_FILE_LOCATION $MAN_FILE_DOWNLOAD || wget_man_error=$? if [[ $wget_man_error -gt 0 ]];then print_screen_output "Oh no! Something went wrong downloading the Man gz file at: $MAN_FILE_DOWNLOAD" - print_screen_output "Check the error messages for what happened." + print_screen_output "Check the error messages for what happened. Error: $wget_man_error" else print_screen_output " Download/install of man page successful. Check to make sure it works: man inxi" fi @@ -1292,7 +1293,7 @@ script_self_updater() print_screen_output "Man file download URL failed, unable to continue: $MAN_FILE_DOWNLOAD" fi else - print_screen_output "Updating / Installing the Man page requires root user, writing to: $man_location" + print_screen_output "Updating / Installing the Man page requires root user, writing to: $MAN_FILE_LOCATION" print_screen_output "If you want the man page, you'll have to run $SCRIPT_NAME -U as root." fi fi diff --git a/inxi.8 b/inxi.8 index d81765c..17da78a 100644 --- a/inxi.8 +++ b/inxi.8 @@ -230,7 +230,8 @@ Show partition UUIDs. Default: short partition \fB-P\fR. For full \fB-p\fR outpu .TP .B -U Auto-update script. Note: if you installed as root, you must be root to update, -otherwise user is fine. +otherwise user is fine. Also installs /updates this Man Page to: \fB-/usr/share/man/man8\fR +This requires that you be root to write to that directory. .TP .B -V inxi version information. Prints information then exits.