(Change version)

Added new distro maintainer flag: B_ALLOW_UPDATE='true' as default. If set to false, it will shut off
the inxi script updating feature, and also turn off the display in -h of the -U option.

This seems a lot easier than having to remove code each release, which would get fairly tiresome.
This commit is contained in:
inxi-svn 2008-11-13 19:27:48 +00:00
parent 784d850121
commit cc83b9eed4

25
inxi
View file

@ -1,10 +1,10 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 0.5.24
#### Date: November 11 2008
#### version: 0.5.25
#### Date: November 13 2008
########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
#### As time permits functionality improvements and recoding will occur.
####
#### inxi, the universal, portable, system info script for irc.
@ -94,6 +94,9 @@ A_X_DATA=''
# check to make sure initial steps run without error for debugging
# inxi hasn't been 'booted' yet.
B_ALL_UP='false'
# flag to allow distro maintainers to turn off update features. If false, turns off
# -U and -! testing/advanced update options, as well as removing the -U help menu item
B_ALLOW_UPDATE='true'
# triggers full display of cpu flags
B_CPU_FLAGS_FULL='false'
# Debug flood override: make 'true' to allow long debug output
@ -502,13 +505,17 @@ get_cmdline()
# args: $1 - full script startup args: $@
get_parameters()
{
local opt='' wget_test=''
local opt='' wget_test='' update_flags='U!:'
local use_short='true' # this is needed to trigger short output, every v/d/F/line trigger sets this false
if [[ $B_ALLOW_UPDATE == 'false' ]];then
update_flags=''
fi
# the short form only runs if no args output args are used
# no need to run through these if there are no args
if [[ -n $1 ]];then
while getopts Ac:CdDfFGhHINPSUv:Vx%@:!: opt
while getopts Ac:CdDfFGhHINPSv:Vx%@:${update_flags} opt
do
case $opt in
A) B_SHOW_AUDIO='true'
@ -672,7 +679,9 @@ show_options()
print_screen_output "-x Show extra data: bogomips on cpu. Only works with verbose or line output."
print_screen_output "Additional Options:"
print_screen_output "-h or -H - this help menu."
print_screen_output "-U Auto-update script. Note: if you installed as root, you"
if [[ $B_ALLOW_UPDATE == 'true' ]];then
print_screen_output "-U Auto-update script. Note: if you installed as root, you"
fi
print_screen_output " must be root to update, otherwise user is fine."
print_screen_output "-V $SCRIPT_NAME version information. Prints information then exits."
print_screen_output "-% Overrides defective or corrupted data."
@ -693,8 +702,8 @@ print_version_info()
print_screen_output "Tested with Irssi, Xchat, Konversation, BitchX, KSirc, ircII,"
print_screen_output "Gaim/Pidgin, Weechat, KVIrc and Kopete."
print_screen_output ""
print_screen_output "This script is a fork of Infobash, which is:"
print_screen_output "Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif <infobash@rebelhomicide.demon.nl>"
print_screen_output "This script is a fork of Infobash 3.02, which is:"
print_screen_output "Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif"
print_screen_output "Subsequent changes and modifications (after Infobash 3.02) are:"
print_screen_output "Copyright (C) 2008 Scott Rogers, Harald Hope, aka trash80 & h2"
print_screen_output ""