This code is old and should no longer be used.
Perl script for downloading Drupal 6.4 and multiple modules. Place in an empty directory as a .pl file and execute.
Updated 2008-9-20
* updated view, og, and devel
Updated 2008-09-13
* added plugin_manager-6.x-1.1
* updated views-6.x+2.0-rc2
Updated 2008-09-12
* added backup_migrate-6.x-1.0
* updated commentrss-6.x-1.2
Updated 2008-08-21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# updated 2008-08-21 | |
$baseurl = 'http://ftp.drupal.org/files/projects/'; | |
$fileextension = '.tar.gz'; | |
$core = 'drupal-6.4'; | |
$modulesfolder = 'sites/all/modules/'; | |
$themesfoler = 'sites/all/themes/'; | |
$settingsfolder = 'sites/default/'; | |
my %modules; | |
$modules{'abuse'} = 'abuse-6.x-1.x-dev'; | |
$modules{'addresses'} = 'addresses-6.x-1.0-alpha2'; | |
$modules{'addtoany'} = 'addtoany-6.x-1.36'; | |
$modules{'about_this_node'} = 'about_this_node-6.x-1.0-rc3'; | |
$modules{'apply_for_role'} = 'apply_for_role-6.x-1.4'; | |
$modules{'backup_migrate'} = 'backup_migrate-6.x-1.0'; | |
$modules{'block_save_edit'} = 'block_save_edit-6.x-1.0-beta1'; | |
$modules{'community_tags'} = 'community_tags-6.x-1.0-beta1'; | |
$modules{'content_profile'} = 'content_profile-6.x-1.0-beta2'; | |
$modules{'cck'} = 'cck-6.x-2.0-rc6'; | |
$modules{'charts'} = 'charts-6.x-1.0-alpha4'; | |
$modules{'captcha'} = 'captcha-6.x-1.0-rc2'; | |
$modules{'calendar'} = 'calendar-6.x-2.0-rc1'; | |
$modules{'codefilter'} = 'codefilter-6.x-1.0'; | |
$modules{'commentrss'} = 'commentrss-6.x-1.2'; | |
$modules{'comment_notify'} = 'comment_notify-6.x-1.0'; | |
$modules{'creativecommons_lite'} = 'creativecommons_lite-6.x-1.0'; | |
$modules{'date'} = 'date-6.x-2.0-rc2'; | |
$modules{'devel'} = 'devel-6.x-1.11'; | |
$modules{'diff'} = 'diff-6.x-2.0'; | |
$modules{'extlink'} = 'extlink-6.x-1.6'; | |
$modules{'flickr'} = 'flickr-6.x-1.0-alpha1'; | |
$modules{'feedapi'} = 'feedapi-6.x-1.2'; | |
$modules{'geshifilter'} = 'geshifilter-6.x-1.1'; | |
$modules{'gravatar'} = 'gravatar-6.x-1.3'; | |
$modules{'google_groups'} = 'google_groups-6.x-1.0'; | |
$modules{'link'} = 'link-6.x-2.3.1'; | |
$modules{'og'} = 'og-6.x-1.0-rc6'; | |
$modules{'og_profiles'} = 'og_profiles-6.x-1.x-dev'; | |
$modules{'pathauto'} = 'pathauto-6.x-1.1'; | |
$modules{'persistent_login'} = 'persistent_login-6.x-1.4-beta2'; | |
$modules{'pingback'} = 'pingback-6.x-1.0'; | |
$modules{'plugin_manager'} = 'plugin_manager-6.x-1.1'; | |
$modules{'poormanscron'} = 'poormanscron-6.x-1.0'; | |
$modules{'quote'} = 'quote-6.x-1.1-beta'; | |
$modules{'recaptcha'} = 'recaptcha-6.x-1.0'; | |
$modules{'revisiontags'} = 'revisiontags-6.x-1.0'; | |
$modules{'tagadelic'} = 'tagadelic-6.x-1.0'; | |
$modules{'textile'} = 'textile-5.x-2.1'; | |
$modules{'token'} = 'token-6.x-1.11'; | |
$modules{'user_mailman_register'} = 'user_mailman_register-6.x-1.1'; | |
$modules{'user_stats'} = 'user_stats-6.x-1.0-alpha1'; | |
$modules{'vcard'} = 'vcard-6.x-1.1'; | |
$modules{'views'} = 'views-6.x-2.0-rc3'; | |
$modules{'wikitools'} = 'wikitools-6.x-1.0'; | |
$modules{'wp_comments'} = 'wp_comments-6.x-1.0'; | |
$modules{'xmlsitemap'} = 'xmlsitemap-6.x-0.x-dev'; | |
&download($core); | |
&extract($core); | |
&rmtar($core); | |
system("mv $core/* ./"); | |
system("mv $core/.htaccess ./.htaccess"); | |
system("rmdir $core"); | |
chmod(0777, "sites/default"); | |
system("touch $settingsfolder/settings.php"); | |
chmod(0777, "sites/default/settings.php"); | |
system("mkdir sites/all/modules sites/all/themes"); | |
my %themes; | |
$themes{'zen-6.x-1.0-beta2'} = 'zen-6.x-1.0-beta2'; | |
while ( my ($key, $value) = each(%modules)) #$module (values %modules) | |
{ | |
&download($value); | |
&extract($value); | |
&rmtar($value); | |
&mvfolder($key, $modulesfolder); | |
} | |
sub download { #takes nameversion | |
my ($nameversion) = @_; | |
$remoteurl = $baseurl.$nameversion.$fileextension; | |
system("wget $remoteurl"); | |
} | |
sub extract { #takes nameversion | |
my($nameversion) = @_; | |
$file = $nameversion.$fileextension; | |
system("tar xvzf $file"); | |
} | |
sub rmtar { #takes nameversion | |
my($nameversion) = @_; | |
$tar = $nameversion.$fileextension; | |
system("rm $tar"); | |
} | |
sub mvfolder { #takes name, path | |
my($foldername, $path) = @_; | |
$newlocation = $path.$foldername; | |
system("mv $foldername $newlocation"); | |
} |
Comments
Post a Comment