Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 39375 Details for
Bug 33206
new ebuild: games-strategy/heroes3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
heroes3_x86_up.pl
heroes3_x86_up.pl (text/plain), 2.99 KB, created by
Alex Linke
on 2004-09-10 22:46:15 UTC
(
hide
)
Description:
heroes3_x86_up.pl
Filename:
MIME Type:
Creator:
Alex Linke
Created:
2004-09-10 22:46:15 UTC
Size:
2.99 KB
patch
obsolete
>#!/usr/bin/perl > >use strict; >use File::Copy; > >do{ print "usage:\t$0 [path-to-heroes3-installation]\n"; exit 1 } > unless( $ARGV[0] ); > >my $install_dir = $ARGV[0]; > >my $VERSION='0.2'; > >my $patchname = 'heroes3-1.3.1a-unified-x86.run'; >my $skip = 176; > ># at the moment i can only localize one *good* mirror: >my %url_patches = ( > 'Sunsite Denmark' => 'ftp://sunsite.auc.dk/pub/os/linux/loki/updates/heroes3', >); >my %url_lokipatch = ( > 'icculus' => 'http://icculus.org/~msphil/loki/x86', > 'step-n-up' => 'http://step-n-up.com/downloads' >); > >print "heroes3_x86 autoupdater... v$VERSION by Alex Linke.\n"; > >print "\n\t* working in '$ENV{PWD}'...\n"; > >print "\t* making tempdir 'heroes3_up'... "; > >mkdir "$ENV{PWD}/heroes3_up" || _exit($!); > >chdir "$ENV{PWD}/heroes3_up" || _exit($!); > >unless ( -e "../$patchname" ) { > print "\n\t* retrieving patch '$patchname'..."; > foreach( keys %url_patches ) { > print "\n\t\t* trying '$_'...\n"; > last if ( system( "wget $url_patches{$_}/$patchname" ) == 0 ); > } >} >else { > print "\n\t* copying local patchfile to cwd... "; > copy( "../$patchname", "./$patchname" ) || _exit($!); >} > >_exit("no copy of '$patchname' retieved. try manually and save to this dir.") > unless ( -e $patchname ); > >print "\n\t* creating helper 'skip.pl'... "; >open FH, "> ./skip.pl" or _exit($!); >foreach( <DATA> ) { print FH $_ } >close FH; >close DATA; >chmod ( 0755, "./skip.pl" ); > >print "\n\t* unpacking files...\n"; >_exit('cannot unpack files!') > unless( system("./skip.pl $patchname $skip | gzip -cd | tar xv") || -e "patch.dat" ); > >unless ( -e "../loki_patch" ) { > print "\n\t* retrieving sane 'loki_patch'-file... "; > foreach( sort keys %url_lokipatch ) { > print "\n\t\t* trying '$_'...\n"; > last if ( system("wget $url_lokipatch{$_}/loki_patch") == 0 ); > } >} >else { > print "\n\t* copying local 'loki_patch'-file to cwd... "; > copy( "../loki_patch", "./loki_patch" ); >} > >_exit("no copy of 'loki_patch' retrieved. try manually and save to this dir.") > unless ( -e "loki_patch" ); >chmod ( 0755, "./loki_patch" ); > >print "\n\t* checking if '$install_dir' contains a valid Heroes3 installation... "; >_exit("no Heroes3-installation found in '$install_dir'!") > unless( -e "$install_dir/heroes3" ); > >print "\n\t* creating a rescue-binary... "; >copy("$install_dir/heroes3", "$install_dir/heroes3.orig") || > _exit("cannot create rescue binary 'heroes3.orig'."); > >print "\n\t* patching...\n"; >_exit("Errors during patching!") > unless ( system("./loki_patch patch.dat $install_dir") == 0 ); > >print "\n\noutput of 'heroes3 --version':\n", "=-" x 40, "\n"; >system("$install_dir/heroes3 --version"); >print "=-" x 40, "\n\n"; > >print "Wuha! You're done. Have fun with it!\n"; > > > ># ----------------------------------------------------------------- # >sub _exit { ># ----------------------------------------------------------------- # > print "\n[FATAL]: $_[0]\n"; > exit 1; >} > >__DATA__ >#!/usr/bin/perl > >use strict; > >my $count = 0; > >open FH, "$ARGV[0]" or die "$!"; > >foreach( <FH> ) { > print if (++$count > $ARGV[1]); >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 33206
:
20573
|
20588
|
20591
|
20610
|
32093
|
36468
|
39375
|
40682
|
40705