
| Current Path : /proc/thread-self/root/home/ift/51_iftlib/drupal/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //proc/thread-self/root/home/ift/51_iftlib/drupal/_aclear.pl |
opendir(DDIR,".");
@ee = ();
while (0 == 0) {
$o = readdir(DDIR);
last if (!$o);
next if ($o =~ /^\./);
next if (!(-d($o)));
next if ($o !~ /./);
push(@ee,$o);
}
closedir(DDIR);
$person = `pwd`;
$person =~ /\/(u|home)\/(.*?)\//;
$person = $2;
foreach $o (sort @ee) {
next if (-f "$o/no_drush");
next if (!(-f "$o/update.php"));
print "\n\n===============\nclearing $o ...\n";
chdir($o);
print "Apply pending database patches\n";
system("drush pm-download --yes rules");
system("drush updatedb --yes");
system("drush pm-enable rules --yes");
print "Updating ...\n";
system("drush pm-update --yes");
system("drush updatedb --yes");
print " clearing caches\n";
system("rm \*~");
system("rm -R sites/all/libraries/ckeditor");
system("drush cc all");
system("drush pm-disable wysiwyg --yes");
system("drush pm-download ckeditor --yes");
system("drush pm-enable ckeditor --yes");
system("drush ckeditor-download --yes");
print " creating database dump\n";
system("drush sql-dump > database.dump");
print " deleting aggregated css and js files\n";
system("rm sites/default/files/css/*");
system("rm -R sites/default/files/js/*");
chdir("..");
system("chmod -R a+rwx \*");
system("chmod -R a+rwx .");
system("chmod -R o-rwx \*");
system("chmod -R o-rwx .");
system("chown -R $person:www-data \*");
system("chown -R $person:www-data .");
chdir($o);
system("rm yy.txt");
# system("git add .");
# system("git commit -m 'drupal site $o updated' -a");
chdir("..");
}