summaryrefslogtreecommitdiffstats
path: root/scripts/cleanup
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-12-27 12:33:35 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-12-27 12:42:12 +0100
commit332d0f61e49a5aa1a127ee692d06d10b0cba1f44 (patch)
treeb82982231a60bf4573fae46fefa0a8619abd85e1 /scripts/cleanup
parent9ed559eb3377b010df9915ef85dd40d6b5fdf803 (diff)
downloadaurweb-332d0f61e49a5aa1a127ee692d06d10b0cba1f44.tar.xz
Remove legacy scripts
These are no longer needed. We use Git repositories now. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'scripts/cleanup')
-rwxr-xr-xscripts/cleanup46
1 files changed, 0 insertions, 46 deletions
diff --git a/scripts/cleanup b/scripts/cleanup
deleted file mode 100755
index 0ccbe7d..0000000
--- a/scripts/cleanup
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/php
-<?php
-# Run this script by providing it with the top path of AUR.
-# In that path you should see a file lib/aur.inc
-#
-# This will remove files which belong to deleted packages
-# in unsupported.
-#
-# ex: php cleanup dev/aur/web
-#
-$dir = $argv[1];
-
-if (empty($dir)) {
- echo "Please specify AUR directory.\n";
- exit;
-}
-
-set_include_path(get_include_path() . PATH_SEPARATOR . "$dir/lib");
-include("confparser.inc.php");
-include("aur.inc.php");
-include("pkgfuncs.inc.php");
-
-$count = 0;
-
-$incoming_dir = config_get('paths', 'storage');
-$buckets = scandir($incoming_dir);
-foreach ($buckets as $bucket) {
- $bucketpath = $incoming_dir . $bucket;
- if ($bucket == '.' || $bucket == '..' || !is_dir($bucketpath)) {
- continue;
- }
- $files = scandir($incoming_dir . $bucket);
- foreach ($files as $pkgname) {
- if ($pkgname == '.' || $pkgname == '..') {
- continue;
- }
- $fullpath = $incoming_dir . $bucket . "/" . $pkgname;
- if (!pkg_from_name($pkgname) && is_dir($fullpath)) {
- echo 'Removing ' . $fullpath . "\n";
- rm_tree($fullpath);
- $count++;
- }
- }
-}
-
-echo "\nRemoved $count directories.\n";