OneOfOne
well this is a script to generate a files list to download with wget (or anything else you want).
there's a script like it on gentoo's forums but it sometimes outputs weird stuff at the end.
what's the use of this script? sadly most people here (including myself) have dialup and some of them are lucky to know people with fast connections (not me :() so i decided to make this script for those lucky ones ;)
say you want to get a list of the files you will need to emerge kde + update everything else in the way, you will just type : ./emerge_list -e kde > wget.list
later you can use that wget.list file on any other computer to get the files you need then copy them back to your /usr/portage/distfiles/
#!/usr/bin/php
<?php
# emerge_list : a script by OneOfOne (OneOfOne{at}limitlessfx{dot}com)
# to generate a list of files that needs to by downloaded for a package, mainly for dialup users.
# this needs >=php-4.3.2 (should work on lower versions but i haven't tried).
# use :
# chmod +x emerge_list && ./emerge_list blah blah blah -emerge_arg OR
# php emerge_list blah blah blah -emerge_arg
# ./emerge_list package > wget_list
# wget -c -i wget_list //you MUST add -c to wget or it'll redownload the file from each mirror.
#ps you need "register_argc_argv = On" in php.ini
$exit ="You must supply atleast 1 valid arg.\n";
if($argc > 1){
unset($argv[0]);
$args = trim(join(" ", $argv));
if($args){
$eo = trim(str_replace("\n", "", shell_exec("emerge -fp $args 2>&1 >/dev/null")));
$old_eo = explode(" ", $eo);
foreach($old_eo as $str){
if(strpos($str,"http://")!==FALSE || strpos($str,"ftp://")!==FALSE)
print($str."\n");
}
$exit="";
}
}
exit($exit);
?>
<faqs>
<faq id="Why is this a php script?">
i like php..
</faq>
<faq id="You suck, gentoo suck, go die!">
whatever...
</faq>
<faq id="it formated my harddisk and killed my familly!!!!!">
LOL!
</faq>
</faqs>
peace
there's a script like it on gentoo's forums but it sometimes outputs weird stuff at the end.
what's the use of this script? sadly most people here (including myself) have dialup and some of them are lucky to know people with fast connections (not me :() so i decided to make this script for those lucky ones ;)
say you want to get a list of the files you will need to emerge kde + update everything else in the way, you will just type : ./emerge_list -e kde > wget.list
later you can use that wget.list file on any other computer to get the files you need then copy them back to your /usr/portage/distfiles/
#!/usr/bin/php
<?php
# emerge_list : a script by OneOfOne (OneOfOne{at}limitlessfx{dot}com)
# to generate a list of files that needs to by downloaded for a package, mainly for dialup users.
# this needs >=php-4.3.2 (should work on lower versions but i haven't tried).
# use :
# chmod +x emerge_list && ./emerge_list blah blah blah -emerge_arg OR
# php emerge_list blah blah blah -emerge_arg
# ./emerge_list package > wget_list
# wget -c -i wget_list //you MUST add -c to wget or it'll redownload the file from each mirror.
#ps you need "register_argc_argv = On" in php.ini
$exit ="You must supply atleast 1 valid arg.\n";
if($argc > 1){
unset($argv[0]);
$args = trim(join(" ", $argv));
if($args){
$eo = trim(str_replace("\n", "", shell_exec("emerge -fp $args 2>&1 >/dev/null")));
$old_eo = explode(" ", $eo);
foreach($old_eo as $str){
if(strpos($str,"http://")!==FALSE || strpos($str,"ftp://")!==FALSE)
print($str."\n");
}
$exit="";
}
}
exit($exit);
?>
<faqs>
<faq id="Why is this a php script?">
i like php..
</faq>
<faq id="You suck, gentoo suck, go die!">
whatever...
</faq>
<faq id="it formated my harddisk and killed my familly!!!!!">
LOL!
</faq>
</faqs>
peace