mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-02-01 16:36:48 +01:00
Zenity added.
This commit is contained in:
parent
3f9056b24f
commit
458bf388eb
314
bygfoot-update
314
bygfoot-update
@ -3,14 +3,14 @@
|
|||||||
####################################################
|
####################################################
|
||||||
# Bygfoot Football Manager #
|
# Bygfoot Football Manager #
|
||||||
# AUTHOR: Gyozo Both (gyboth@bygfoot.com) #
|
# AUTHOR: Gyozo Both (gyboth@bygfoot.com) #
|
||||||
# http://www.bygfoot.com #
|
# http://bygfoot.sourceforge.net #
|
||||||
####################################################
|
####################################################
|
||||||
|
|
||||||
# Skript that updates src packages of the Bygfoot Football Manager
|
# Skript that updates src packages of the Bygfoot Football Manager
|
||||||
# using wget to retrieve patches from the homepage
|
# using wget to retrieve patches from the homepage
|
||||||
|
|
||||||
# version number
|
# version number
|
||||||
version="0.13"
|
version="1.9.1"
|
||||||
# the bygfoot release version the script is shipped with
|
# the bygfoot release version the script is shipped with
|
||||||
relversion=VERSION
|
relversion=VERSION
|
||||||
# the current release version on the server
|
# the current release version on the server
|
||||||
@ -62,8 +62,8 @@ cvs_version1=bygfoot-unstable
|
|||||||
cvs_version2=bygfoot2-unstable
|
cvs_version2=bygfoot2-unstable
|
||||||
cvs_version=
|
cvs_version=
|
||||||
|
|
||||||
# SourceForge.Net username (for cvs checkout)
|
# whether we use zenity
|
||||||
cvs_user=
|
use_zenity=
|
||||||
|
|
||||||
# The file we redirect dialog output to
|
# The file we redirect dialog output to
|
||||||
input_file=$PWD/bygfoot-update-dialog.tmp
|
input_file=$PWD/bygfoot-update-dialog.tmp
|
||||||
@ -86,6 +86,9 @@ check=1
|
|||||||
# the server
|
# the server
|
||||||
get_version=0
|
get_version=0
|
||||||
|
|
||||||
|
# SourceForge.Net username (for cvs checkout)
|
||||||
|
cvs_user=
|
||||||
|
|
||||||
# whether we show the log file before terminating
|
# whether we show the log file before terminating
|
||||||
# if so, the file doesn't get deleted by cleanup()
|
# if so, the file doesn't get deleted by cleanup()
|
||||||
show_log=0
|
show_log=0
|
||||||
@ -110,8 +113,7 @@ Usage: bygfoot-update [OPTIONS]
|
|||||||
Note: You can call bygfoot-update without any options.
|
Note: You can call bygfoot-update without any options.
|
||||||
|
|
||||||
MAIN OPTIONS:
|
MAIN OPTIONS:
|
||||||
-c|--country-files Download country files with official team names
|
-c|--country-files Download some official team names of well known teams
|
||||||
and team definitions file
|
|
||||||
-n|--new-package Download the latest complete package
|
-n|--new-package Download the latest complete package
|
||||||
-u|--update Update your Bygfoot source package using patches
|
-u|--update Update your Bygfoot source package using patches
|
||||||
-b|--cvs Get CVS version
|
-b|--cvs Get CVS version
|
||||||
@ -125,6 +127,8 @@ Global:
|
|||||||
show its contents instead.
|
show its contents instead.
|
||||||
-t|--temp-dir DIR Set temp directory to DIR
|
-t|--temp-dir DIR Set temp directory to DIR
|
||||||
-v|--version Print version information and exit
|
-v|--version Print version information and exit
|
||||||
|
-Z|--no-zenity Don't use zenity even if the version installed
|
||||||
|
is usable
|
||||||
|
|
||||||
Relevant for source update mode:
|
Relevant for source update mode:
|
||||||
-a|--apply-all Apply all new patches without prompting
|
-a|--apply-all Apply all new patches without prompting
|
||||||
@ -133,8 +137,8 @@ Relevant for source update mode:
|
|||||||
-R|--no-recompile Don't recompile after updating
|
-R|--no-recompile Don't recompile after updating
|
||||||
|
|
||||||
Relevant for country files mode:
|
Relevant for country files mode:
|
||||||
-C|--country-dir DIR Set destination directory for the
|
-C|--country-dir DIR Set the directory that contains the definitions
|
||||||
country files and def file to DIR
|
directory
|
||||||
|
|
||||||
Relevant for package download mode:
|
Relevant for package download mode:
|
||||||
-f|--format FORMAT Set package format to FORMAT:
|
-f|--format FORMAT Set package format to FORMAT:
|
||||||
@ -178,9 +182,14 @@ function my_echo()
|
|||||||
# show log file before exiting if the option is set
|
# show log file before exiting if the option is set
|
||||||
function my_exit()
|
function my_exit()
|
||||||
{
|
{
|
||||||
|
|
||||||
if [ $show_log -eq 1 ]; then
|
if [ $show_log -eq 1 ]; then
|
||||||
if [ -r $log_file ]; then
|
if [ -r $log_file ]; then
|
||||||
dialog --title "Bygfoot Online Update" --textbox $log_file 22 75
|
if [ $use_zenity -eq 1 ]; then
|
||||||
|
my_zenity --title="Bygfoot Online Update Log" --text-info --filename=$log_file
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --textbox $log_file 22 75
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "** WARNING: log file $log_file not readable."
|
echo "** WARNING: log file $log_file not readable."
|
||||||
fi
|
fi
|
||||||
@ -193,10 +202,10 @@ function my_exit()
|
|||||||
# parse arguments
|
# parse arguments
|
||||||
function parse_args()
|
function parse_args()
|
||||||
{
|
{
|
||||||
TEMP=`getopt -o aAbcB:C:f:hlnNp:rRt:T:uU:vV --long apply-all,\
|
TEMP=`getopt -o aAbcB:C:f:hlnNp:rRt:T:uU:vVZ --long apply-all,\
|
||||||
auto,branch:,country-files,country-dir:,cvs,format:,help,new-package,no-check,\
|
auto,branch:,country-files,country-dir:,cvs,format:,help,new-package,no-check,\
|
||||||
package-dir:,recompile,no-recompile,show-log,temp-dir:,type:,update,username:\
|
package-dir:,recompile,no-recompile,show-log,temp-dir:,type:,update,username:\
|
||||||
version,get-version -- $*`
|
version,get-version,no-zenity -- $*`
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
my_echo "** b-u: There was an error parsing the arguments."
|
my_echo "** b-u: There was an error parsing the arguments."
|
||||||
@ -228,6 +237,7 @@ version,get-version -- $*`
|
|||||||
-U|--username) cvs_user=$2; shift 2 ;;
|
-U|--username) cvs_user=$2; shift 2 ;;
|
||||||
-v|--version) print_version; exit $EXITOK ;;
|
-v|--version) print_version; exit $EXITOK ;;
|
||||||
-V|--get-version) mode=$mode_pack; get_version=1; shift ;;
|
-V|--get-version) mode=$mode_pack; get_version=1; shift ;;
|
||||||
|
-Z|--no-zenity) use_zenity=0; shift ;;
|
||||||
--) shift; break ;;
|
--) shift; break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -237,12 +247,14 @@ version,get-version -- $*`
|
|||||||
function cleanup()
|
function cleanup()
|
||||||
{
|
{
|
||||||
my_echo
|
my_echo
|
||||||
my_echo "** b-u: Removing dialog output file $input_file."
|
my_echo "** b-u: Removing output file $input_file."
|
||||||
rm -rfv $input_file 2>> $log_file | tee -a $log_file
|
rm -rfv $input_file 2>> $log_file | tee -a $log_file
|
||||||
|
|
||||||
if [ ! -z $tmpdir -a $mode -neq $mode_pack ];then
|
if [ ! -z $tmpdir ]; then
|
||||||
my_echo "** b-u: Cleaning up in the temp directory."
|
if [ $mode -ne $mode_pack ]; then
|
||||||
rm -rfv 2>> $log_file | tee -a $log_file
|
my_echo "** b-u: Cleaning up in the temp directory."
|
||||||
|
rm -rfv 2>> $log_file | tee -a $log_file
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $show_log -eq 0 ]; then
|
if [ $show_log -eq 0 ]; then
|
||||||
@ -261,6 +273,43 @@ function my_wget()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# wrapper for zenity
|
||||||
|
function my_zenity()
|
||||||
|
{
|
||||||
|
zenity "$@" 1> $input_file
|
||||||
|
exitval=$?
|
||||||
|
|
||||||
|
if [ $exitval -eq 255 ]; then
|
||||||
|
my_echo "** b-u: zenity error."
|
||||||
|
read a
|
||||||
|
elif [ $exitval -eq 1 ]; then
|
||||||
|
my_echo "** b-u: User abort."
|
||||||
|
my_exit $EXITUSR
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# check for high enough version of zenity
|
||||||
|
function check_zenity()
|
||||||
|
{
|
||||||
|
my_echo -n "** b-u: checking for zenity..."
|
||||||
|
if ! which zenity &> /dev/null; then
|
||||||
|
my_echo " not installed. I'm going to use dialog."
|
||||||
|
else
|
||||||
|
zenver=$(zenity --version)
|
||||||
|
zenver1=$(echo $zenver |sed "s/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/g")
|
||||||
|
zenver2=$(echo $zenver |sed "s/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/g")
|
||||||
|
zenver3=$(echo $zenver |sed "s/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/g")
|
||||||
|
|
||||||
|
if [ $zenver1 -ge 2 -a $zenver2 -ge 9 -a $zenver3 -ge 0 ]; then
|
||||||
|
my_echo " $zenver1.$zenver2.$zenver3 found."
|
||||||
|
use_zenity=1
|
||||||
|
else
|
||||||
|
my_echo " $zenver1.$zenver2.$zenver3 not good enough. I'm going to use dialog."
|
||||||
|
use_zenity=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# check for the programs needed
|
# check for the programs needed
|
||||||
function check_progs()
|
function check_progs()
|
||||||
{
|
{
|
||||||
@ -281,6 +330,10 @@ function check_progs()
|
|||||||
read a
|
read a
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -z $use_zenity ]; then
|
||||||
|
check_zenity
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function read_input()
|
function read_input()
|
||||||
@ -304,19 +357,27 @@ function read_input()
|
|||||||
function get_country_files()
|
function get_country_files()
|
||||||
{
|
{
|
||||||
my_echo
|
my_echo
|
||||||
my_echo "** b-u: Fetching country files with official team names and"
|
my_echo "** b-u: Fetching official team names and"
|
||||||
my_echo "** b-u: team definitions file."
|
my_echo "** b-u: team definitions files."
|
||||||
|
|
||||||
pushd $countrydir &>/dev/null
|
pushd $countrydir &>/dev/null
|
||||||
|
|
||||||
my_wget http://bygfoot.sourceforge.net/revisions/bygfoot-countries.tar.bz2
|
my_wget http://bygfoot.sourceforge.net/revisions/official_names
|
||||||
|
|
||||||
for i in country_* teams; do
|
while read -d : oldname && read newname
|
||||||
mv -vf $i $i.old 2>> $log_file | tee -a $log_file
|
do
|
||||||
done
|
if [ "$oldname" == "League" ]; then
|
||||||
|
DIRNAME=$newname
|
||||||
|
my_echo "Patching $DIRNAME..."
|
||||||
|
else
|
||||||
|
oldname="${oldname## }"
|
||||||
|
newname="${newname%% }"
|
||||||
|
sed -i -e "s/>$oldname</>$newname</" definitions/$DIRNAME/league*.xml
|
||||||
|
fi
|
||||||
|
|
||||||
tar xfjv bygfoot-countries.tar.bz2 2>> $log_file | tee -a $log_file
|
done < official_names
|
||||||
rm -vf bygfoot-countries.tar.bz2 2>> $log_file | tee -a $log_file
|
|
||||||
|
rm -vf official_names 2>> $log_file | tee -a $log_file
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@ -331,8 +392,14 @@ function get_paths()
|
|||||||
if [ $mode -eq $mode_src ]; then
|
if [ $mode -eq $mode_src ]; then
|
||||||
if [ -z $packdir ]; then
|
if [ -z $packdir ]; then
|
||||||
if [ $auto -eq 0 ]; then
|
if [ $auto -eq 0 ]; then
|
||||||
dialog --title "Bygfoot Online Update" \
|
if [ $use_zenity -eq 1 ]; then
|
||||||
--inputbox "Source package directory" 22 80 $PWD 2> $input_file
|
my_zenity --title="Select source package directory" \
|
||||||
|
--file-selection --directory
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" \
|
||||||
|
--inputbox "Source package directory" 22 80 $PWD 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
pushd $tempvar; packdir=$PWD; popd
|
pushd $tempvar; packdir=$PWD; popd
|
||||||
@ -349,8 +416,15 @@ function get_paths()
|
|||||||
if [ $mode -ne $mode_country ]; then
|
if [ $mode -ne $mode_country ]; then
|
||||||
if [ -z $tmpdir ]; then
|
if [ -z $tmpdir ]; then
|
||||||
if [ $auto -eq 0 ]; then
|
if [ $auto -eq 0 ]; then
|
||||||
dialog --title "Bygfoot Online Update" --inputbox "Temporary directory\n(you need read/write permissions there)" \
|
if [ $use_zenity -eq 1 ]; then
|
||||||
22 80 /tmp 2> $input_file
|
my_zenity --title="Select temporary directory" \
|
||||||
|
--file-selection --directory
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" \
|
||||||
|
--inputbox "Temporary directory\n(you need read/write permissions there)" \
|
||||||
|
22 80 /tmp 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
if [ ! -z $tempvar ]; then
|
if [ ! -z $tempvar ]; then
|
||||||
@ -371,8 +445,15 @@ function get_paths()
|
|||||||
if [ $mode -eq $mode_country ]; then
|
if [ $mode -eq $mode_country ]; then
|
||||||
if [ -z $countrydir ]; then
|
if [ -z $countrydir ]; then
|
||||||
if [ $auto -eq 0 ]; then
|
if [ $auto -eq 0 ]; then
|
||||||
dialog --title "Bygfoot Online Update" --inputbox "Country files destination directory\n(default destination recommmended)" \
|
if [ $use_zenity -eq 1 ]; then
|
||||||
22 80 $HOME/.bygfoot/text_files 2> $input_file
|
my_zenity --title="Definitions dir ($HOME/.bygfoot-1.9 should be ok; right click to show hidden)" \
|
||||||
|
--file-selection --directory
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" \
|
||||||
|
--inputbox "Directory containing definitions directory\n(default destination should be ok)" \
|
||||||
|
22 80 $HOME/.bygfoot-1.9/ 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
if [ ! -z $tempvar ]; then
|
if [ ! -z $tempvar ]; then
|
||||||
@ -395,11 +476,17 @@ function get_rev_type()
|
|||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
if [ ! -e $packdir/revision_number ]; then
|
if [ ! -e $packdir/revision_number ]; then
|
||||||
dialog --title "Bygfoot Online Update" --msgbox \
|
if [ $use_zenity -eq 1 ]; then
|
||||||
|
my_zenity --title="Bygfoot Online Update" --error \
|
||||||
|
--error-text="I couldn't find the file containing your current revision number and type ($packdir/revision_number)."
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --msgbox \
|
||||||
"I couldn't find the file containing your current revision number and type ($packdir/revision_number).\nFailure." \
|
"I couldn't find the file containing your current revision number and type ($packdir/revision_number).\nFailure." \
|
||||||
22 80 2> $input_file
|
22 80 2> $input_file
|
||||||
read_input
|
fi
|
||||||
my_exit $EXITNOREV
|
|
||||||
|
read_input
|
||||||
|
my_exit $EXITNOREV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
type=$(cat $packdir/revision_number | sed s/[0-9]*//g)
|
type=$(cat $packdir/revision_number | sed s/[0-9]*//g)
|
||||||
@ -442,18 +529,30 @@ function get_revision()
|
|||||||
cd $newrevdir
|
cd $newrevdir
|
||||||
tar xfjv ../revision_$type$newrevnr.tar.bz2 2>> $log_file | tee -a $log_file
|
tar xfjv ../revision_$type$newrevnr.tar.bz2 2>> $log_file | tee -a $log_file
|
||||||
|
|
||||||
dialog --title "Bygfoot Online Update" --textbox README 22 75
|
if [ $use_zenity -eq 1 ]; then
|
||||||
|
my_zenity --title="Patch README" --text-info --filename=README
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --textbox README 22 75
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $apply_all -eq 0 ]; then
|
if [ $apply_all -eq 0 ]; then
|
||||||
|
if [ $use_zenity -eq 1 ]; then
|
||||||
dialog --title "Bygfoot Online Update" --menu \
|
my_zenity --title="Bygfoot Online Update" --list \
|
||||||
|
--list-text="Apply patch? (You can't apply newer ones if you don't apply this one because they depend on each other." \
|
||||||
|
--radiolist --column "" --column "" --column "" \
|
||||||
|
TRUE 1 Yes \
|
||||||
|
FALSE 2 No \
|
||||||
|
FALSE 3 All
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --menu \
|
||||||
"Apply patch?\n(You can't apply newer ones if you don't apply this one because they depend on each other.)" \
|
"Apply patch?\n(You can't apply newer ones if you don't apply this one because they depend on each other.)" \
|
||||||
22 80 10 \
|
22 80 10 \
|
||||||
1 Yes \
|
1 Yes \
|
||||||
2 No \
|
2 No \
|
||||||
3 All 2> $input_file
|
3 All 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
if [ ! -z $tempvar ]; then
|
if [ ! -z $tempvar ]; then
|
||||||
if [ $tempvar -eq 3 ]; then
|
if [ $tempvar -eq 3 ]; then
|
||||||
@ -500,11 +599,19 @@ function update_end()
|
|||||||
my_echo
|
my_echo
|
||||||
|
|
||||||
if [ $found -ge 1 ]; then
|
if [ $found -ge 1 ]; then
|
||||||
|
if [ $use_zenity -eq 1 ]; then
|
||||||
dialog --title "Bygfoot Online Update" --msgbox "$found new revisions found.\nYour new revision number should be $[revnr + found].\nHave a look at the files README, ChangeLog and ReleaseNotes to see the changes that were made." 2> $input_file
|
my_zenity --title="Bygfoot Online Update" --info \
|
||||||
|
--info-text="$found new revisions found. Your new revision number should be $[revnr + found]. Have a look at the files README, ChangeLog and ReleaseNotes to see the changes that were made."
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --msgbox "$found new revisions found.\nYour new revision number should be $[revnr + found].\nHave a look at the files README, ChangeLog and ReleaseNotes to see the changes that were made." 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $recompile -eq 0 -a $auto -eq 0 ]; then
|
if [ $recompile -eq 0 -a $auto -eq 0 ]; then
|
||||||
dialog --title "Bygfoot Online Update" --yesno "Would you like me to execute 'configure && make' ?" 22 80 2> $input_file
|
if [ $use_zenity -eq 1 ]; then
|
||||||
|
my_zenity --title="Bygfoot Online Update" --question --question-text="Would you like me to execute 'configure && make' ?"
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --yesno "Would you like me to execute 'configure && make' ?" 22 80 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
fi
|
fi
|
||||||
@ -515,7 +622,12 @@ function update_end()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
dialog --title "Bygfoot Online Update" --msgbox "No new revisions found.\nYour package seems to be up-to-date." 22 80 2> $input_file
|
if [ $use_zenity -eq 1 ]; then
|
||||||
|
my_zenity --title="Bygfoot Online Update" --info \
|
||||||
|
--info-text="No new revisions found.\nYour package seems to be up-to-date."
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --msgbox "No new revisions found.\nYour package seems to be up-to-date." 22 80 2> $input_file
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
my_echo
|
my_echo
|
||||||
@ -562,11 +674,18 @@ function get_type()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $auto -ne 1 ];then
|
if [ $auto -ne 1 ];then
|
||||||
|
if [ $use_zenity -eq 1 ]; then
|
||||||
dialog --title "Bygfoot Online Update" --menu "Specify package type" \
|
my_zenity --title="Bygfoot Online Update" --list \
|
||||||
22 80 10 \
|
--list-text="Specify package type:" \
|
||||||
1 "Stable" \
|
--radiolist --column "" --column "" --column "" \
|
||||||
2 "Unstable" 2> $input_file
|
TRUE 1 Stable \
|
||||||
|
FALSE 2 Unstable
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --menu "Specify package type" \
|
||||||
|
22 80 10 \
|
||||||
|
1 "Stable" \
|
||||||
|
2 "Unstable" 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
@ -585,14 +704,25 @@ function get_format()
|
|||||||
{
|
{
|
||||||
if [ -z $format ]; then
|
if [ -z $format ]; then
|
||||||
if [ $auto -ne 1 -a $get_version -ne 1 ]; then
|
if [ $auto -ne 1 -a $get_version -ne 1 ]; then
|
||||||
|
if [ $use_zenity -eq 1 ]; then
|
||||||
|
my_zenity --title="Bygfoot Online Update" --list \
|
||||||
|
--list-text="Specify package type:" \
|
||||||
|
--radiolist --column "" --column "" --column "" \
|
||||||
|
TRUE 1 "RPM" \
|
||||||
|
FALSE 2 "Binary" \
|
||||||
|
FALSE 3 "Source" \
|
||||||
|
FALSE 4 "Debian" \
|
||||||
|
FALSE 5 "Source RPM"
|
||||||
|
else
|
||||||
|
|
||||||
dialog --title "Bygfoot Online Update" --menu "Specify package format" \
|
dialog --title "Bygfoot Online Update" --menu "Specify package format" \
|
||||||
22 80 10 \
|
22 80 10 \
|
||||||
1 "RPM" \
|
1 "RPM" \
|
||||||
2 "Binary" \
|
2 "Binary" \
|
||||||
3 "Source" \
|
3 "Source" \
|
||||||
4 "Debian" \
|
4 "Debian" \
|
||||||
5 "Source RPM" 2> $input_file
|
5 "Source RPM" 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
@ -612,6 +742,7 @@ function get_format()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# todo
|
||||||
if [ "$type" = "$type_unstable" -a "$format" = "$format_deb" ]; then
|
if [ "$type" = "$type_unstable" -a "$format" = "$format_deb" ]; then
|
||||||
dialog --title "Bygfoot Online Update" --msgbox \
|
dialog --title "Bygfoot Online Update" --msgbox \
|
||||||
"There are no unstable packages for Debian. Sorry.\nFailure." 22 80 2> $input_file
|
"There are no unstable packages for Debian. Sorry.\nFailure." 22 80 2> $input_file
|
||||||
@ -640,7 +771,13 @@ function get_latest_version()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dialog --title "Bygfoot Online Update" --yesno "Latest $type version is $packversion.\nYour version (as far as i know) is $relversion.\nDo you want me to download the package?" 22 80 2> $input_file
|
if [ $use_zenity -eq 1 ]; then
|
||||||
|
my_zenity --title="Bygfoot Online Update" --question \
|
||||||
|
--question-text="Latest $type version is $packversion. Your version (as far as i know) is $relversion. Do you want me to download the package?"
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" \
|
||||||
|
--yesno "Latest $type version is $packversion.\nYour version (as far as i know) is $relversion.\nDo you want me to download the package?" 22 80 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
}
|
}
|
||||||
@ -662,8 +799,15 @@ function get_new_package()
|
|||||||
|
|
||||||
my_wget http://bygfoot.sourceforge.net/packages/$type/$file
|
my_wget http://bygfoot.sourceforge.net/packages/$type/$file
|
||||||
|
|
||||||
dialog --title "Bygfoot Online Update" --msgbox "You can find the package $file\nin the directory $PWD." \
|
if [ $use_zenity -eq 1 ]; then
|
||||||
22 80 2> $input_file
|
my_zenity --title="Bygfoot Online Update" --info \
|
||||||
|
--info-text="You can find the package $file in the directory $PWD."
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" \
|
||||||
|
--msgbox "You can find the package $file\nin the directory $PWD." \
|
||||||
|
22 80 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
my_echo "** b-u: Done."
|
my_echo "** b-u: Done."
|
||||||
|
|
||||||
my_exit $EXITOK
|
my_exit $EXITOK
|
||||||
@ -692,11 +836,21 @@ function get_mode()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dialog --title "Bygfoot Online Update" --menu "Main Menu" 22 80 10 \
|
if [ $use_zenity -eq 1 ]; then
|
||||||
1 " Update your Bygfoot source package using patches" \
|
my_zenity --title="Bygfoot Online Update" --list \
|
||||||
2 " Download the latest Bygfoot release" \
|
--list-text="Main Menu" \
|
||||||
3 " Get country file package with official team names" \
|
--radiolist --column "" --column "" --column "" \
|
||||||
4 " Get CVS version (2+ MB 'cause it's not compressed)" 2> $input_file
|
TRUE 1 "Update your Bygfoot source package using patches" \
|
||||||
|
FALSE 2 "Download the latest Bygfoot release" \
|
||||||
|
FALSE 3 "Get official team names and team definitions" \
|
||||||
|
FALSE 4 "Get CVS version (2+ MB 'cause it's not compressed)"
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --menu "Main Menu" 22 80 10 \
|
||||||
|
1 " Update your Bygfoot source package using patches" \
|
||||||
|
2 " Download the latest Bygfoot release" \
|
||||||
|
3 " Get official team names and team definitions" \
|
||||||
|
4 " Get CVS version (2+ MB 'cause it's not compressed)" 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
@ -719,9 +873,17 @@ function get_mode()
|
|||||||
function get_cvs()
|
function get_cvs()
|
||||||
{
|
{
|
||||||
if [ -z $cvs_version ];then
|
if [ -z $cvs_version ];then
|
||||||
dialog --title "Bygfoot Online Update" --menu "Specify CVS version" 22 80 10 \
|
if [ $use_zenity -eq 1 ]; then
|
||||||
1 " 1.8 branch" \
|
my_zenity --title="Bygfoot Online Update" --list \
|
||||||
2 " 1.9 branch" 2> $input_file
|
--list-text="Specify CVS version" \
|
||||||
|
--radiolist --column "" --column "" --column "" \
|
||||||
|
FALSE 1 " 1.8 branch" \
|
||||||
|
TRUE 2 " 1.9 branch"
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --menu "Specify CVS version" 22 80 10 \
|
||||||
|
1 " 1.8 branch" \
|
||||||
|
2 " 1.9 branch" 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
@ -733,7 +895,12 @@ function get_cvs()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $cvs_user ];then
|
if [ -z $cvs_user ];then
|
||||||
dialog --title "Bygfoot Online Update" --inputbox "If you'd like to check out as a developer, enter your\nSourceForge.net username. Press RETURN to download anonymously." 22 80 2> $input_file
|
if [ $use_zenity -eq 1 ]; then
|
||||||
|
my_zenity --title="Bygfoot Online Update" --entry \
|
||||||
|
--text="If you'd like to check out as a developer, enter your SourceForge.net username. Leave empty to check out anonymously."
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" --inputbox "If you'd like to check out as a developer, enter your\nSourceForge.net username. Press RETURN to download anonymously." 22 80 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
|
|
||||||
@ -754,8 +921,13 @@ function get_cvs()
|
|||||||
$cvs_command checkout $cvs_version 2>> $log_file | tee -a $log_file
|
$cvs_command checkout $cvs_version 2>> $log_file | tee -a $log_file
|
||||||
|
|
||||||
if [ $recompile -eq 0 -a $auto -eq 0 ]; then
|
if [ $recompile -eq 0 -a $auto -eq 0 ]; then
|
||||||
dialog --title "Bygfoot Online Update" \
|
if [ $use_zenity -eq 1 ]; then
|
||||||
--yesno "Would you like me to execute 'autogen.sh && make' ?" 22 80 2> $input_file
|
my_zenity --title="Bygfoot Online Update" --question \
|
||||||
|
--question-text="Would you like me to execute 'autogen.sh && make' ?"
|
||||||
|
else
|
||||||
|
dialog --title "Bygfoot Online Update" \
|
||||||
|
--yesno "Would you like me to execute 'autogen.sh && make' ?" 22 80 2> $input_file
|
||||||
|
fi
|
||||||
|
|
||||||
read_input
|
read_input
|
||||||
fi
|
fi
|
||||||
|
@ -25,28 +25,28 @@
|
|||||||
<team_name>Alavés</team_name>
|
<team_name>Alavés</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>At. Madrid</team_name>
|
<team_name>A. Madrid</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Athletic</team_name>
|
<team_name>A. Bilbao</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Barcelona</team_name>
|
<team_name>Barcelona</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Betis</team_name>
|
<team_name>B. Sevilla</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Cádiz</team_name>
|
<team_name>Cádiz</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Celta</team_name>
|
<team_name>C. Vigo</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Deportivo</team_name>
|
<team_name>La Coruña</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Espanyol</team_name>
|
<team_name>E. Barcelona</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Getafe</team_name>
|
<team_name>Getafe</team_name>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
<team_name>R. Sociedad</team_name>
|
<team_name>R. Sociedad</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Racing</team_name>
|
<team_name>R. Santander</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Sevilla</team_name>
|
<team_name>Sevilla</team_name>
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
<team_name>R. Madrid B</team_name>
|
<team_name>R. Madrid B</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Recreativo</team_name>
|
<team_name>R. d. Huelva</team_name>
|
||||||
</team>
|
</team>
|
||||||
<team>
|
<team>
|
||||||
<team_name>Sporting</team_name>
|
<team_name>Sporting</team_name>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user