(Change Version)

For some reason, wget suddenly decided to show output, so added -q to script_self_updater function wgets
This commit is contained in:
inxi-svn 2008-11-11 20:04:33 +00:00
parent a761abbda7
commit 83a50c790a

6
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 0.5.15
#### version: 0.5.16
#### Date: November 11 2008
########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -679,10 +679,10 @@ script_self_updater()
print_screen_output "Currently running $SCRIPT_NAME version number: $SCRIPT_VERSION_NUMBER"
print_screen_output "Updating $SCRIPT_NAME in $SCRIPT_PATH using $2 as download source..."
# first test if path is good
wget --spider $1$SCRIPT_NAME
wget -q --spider $1$SCRIPT_NAME
# then do the actual download, need to make sure it's good because we're -O overwriting file
if [[ $? -eq 0 ]];then
wget -O $SCRIPT_PATH/$SCRIPT_NAME $1$SCRIPT_NAME || error_handler 8 "$?"
wget -q -O $SCRIPT_PATH/$SCRIPT_NAME $1$SCRIPT_NAME || error_handler 8 "$?"
if [[ $? -eq 0 ]];then
SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | gawk '{print $3}' )
print_screen_output "Successfully updated to $2 version: $SCRIPT_VERSION_NUMBER\nTo run the new version, just start $SCRIPT_NAME again."