summaryrefslogtreecommitdiffstats
path: root/scripts/cleanup
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-07-31 19:04:59 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-08-11 16:17:07 +0200
commit0ac8970b62ad728bc0988e7e0a7f16efe78ea6cd (patch)
tree031ca86c87168d2439d3daba78bf405ae5b03f55 /scripts/cleanup
parent6ae2bc514f61d3e56d008cd1901d91bdbc6752d2 (diff)
downloadaur-0ac8970b62ad728bc0988e7e0a7f16efe78ea6cd.tar.gz
aur-0ac8970b62ad728bc0988e7e0a7f16efe78ea6cd.tar.xz
Rename package_exists() to pkgid_from_name()
Describe what this function actually does: Return the ID of a package with a given name and return NULL if such a package doesn't exist. The function name is chosen in a fashion similar to other functions from "pkgfuncs.inc.php" (pkgname_from_id(), pkgnotify_from_sid(), ...). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'scripts/cleanup')
-rwxr-xr-xscripts/cleanup2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/cleanup b/scripts/cleanup
index d3ba3f9e..79994298 100755
--- a/scripts/cleanup
+++ b/scripts/cleanup
@@ -34,7 +34,7 @@ foreach ($buckets as $bucket) {
continue;
}
$fullpath = INCOMING_DIR . $bucket . "/" . $pkgname;
- if (!package_exists($pkgname) && is_dir($fullpath)) {
+ if (!pkgid_from_name($pkgname) && is_dir($fullpath)) {
echo 'Removing ' . $fullpath . "\n";
rm_tree($fullpath);
$count++;