summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkmodular6
1 files changed, 4 insertions, 2 deletions
diff --git a/mkmodular b/mkmodular
index 027a242..201f51c 100755
--- a/mkmodular
+++ b/mkmodular
@@ -1,6 +1,7 @@
#!/usr/bin/php
<?php
-chdir('/home/rpmbuild/site/rpms');
+define('TOPDIR', '/home/rpmbuild/site/rpms');
+chdir(TOPDIR);
$template_php = <<< EOT
---
@@ -320,6 +321,7 @@ function cleanup($dest) {
}
function createRepo($dest, $mod) {
+$old = getcwd();
chdir($dest);
exec("mkrepo nocheck noclean");
@@ -330,7 +332,7 @@ exec("modifyrepo_c --mdtype=modules $data repodata >/dev/null");
$arch = basename($dest);
rename($data, "$data.$arch");
-chdir(__DIR__);
+chdir($old);
}
if (count($_SERVER['argv']) > 1 && in_array('f30', $_SERVER['argv'])) {