summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-12-23 07:53:53 +0100
committerRemi Collet <remi@remirepo.net>2020-12-23 07:53:53 +0100
commit692f99140fbe7f28809277a995f8f6a42557baf4 (patch)
tree640af8fbbb66d1dbbc0cf7158e01f21a9cb9718b
parentf07c11866e82b5195ce23e681afd37c36238409b (diff)
fix change dir
-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'])) {