-
- foreach (glob($pkgtemp."*") as $pkgtemp) {
- $pkgfile = str_replace($pkguniq, "{$pkgdesc}.ext", $pkgtemp);
- $pkgname = $this->args->dest ."/". basename($pkgfile);
- $this->info("Finalizing %s ... ", $pkgname);
- if (!rename($pkgtemp, $pkgname)) {
- $this->error(null);
- exit(5);
- }
- $this->info("OK\n");
- if ($this->args->sign && isset($privkey)) {
- $keyname = $this->args->dest ."/". basename($pkgfile) . ".pubkey";
- $this->info("Public Key %s ... ", $keyname);
- try {
- $privkey->exportPublicKey($keyname);
- $this->info("OK\n");
- } catch (\Exception $e) {
- $this->error("%s", $e->getMessage());
- }
- }
- }