From ae63e9973b71fad214adc9c81c748917d0de7e4d Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 30 Oct 2008 22:22:59 +0000 Subject: [PATCH] Adding version number output for updating feature --- inxi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inxi b/inxi index 9c6023d..c00f23a 100755 --- a/inxi +++ b/inxi @@ -408,10 +408,11 @@ get_parameters() grep -q "^[0-${VERBOSITY_LEVELS}]$" <<< $VERBOSITY_LEVEL || error_handler 4 "$VERBOSITY_LEVEL" ;; -U) - print_screen_output "Updating $SCRIPT_NAME now..." + print_screen_output "Updating $SCRIPT_NAME. Current version number: $SCRIPT_VERSION_NUMBER" wget -O $SCRIPT_PATH/$SCRIPT_NAME http://techpatterns.com/downloads/distro/$SCRIPT_NAME || error_handler 8 "$?" if [ "$?" -eq 0 ];then - print_screen_output "To run the new version, just start $SCRIPT_NAME again." + SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3}' ) + print_screen_output "Successfully updated to version: $SCRIPT_VERSION_NUMBER\nTo run the new version, just start $SCRIPT_NAME again." exit 0 fi ;;