Skip to content

Commit

Permalink
Fixed build issue on Mac OSX.
Browse files Browse the repository at this point in the history
  • Loading branch information
cubiclesoft committed Oct 4, 2018
1 parent 6fb9e56 commit 83175e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion installers/nix-tar-gz/package.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// Determine the OS.
$os = php_uname("s");
$windows = (strtoupper(substr($os, 0, 3)) == "WIN");
$mac = (strtoupper(substr($os, 0, 6)) == "DARWIN");

if ($windows) echo "This script might not work as expected on Windows. Running this script via a reasonable Bash port (e.g. git bash) is recommended for tar/gzip support.\n\n";

Expand Down Expand Up @@ -79,7 +80,7 @@
echo "Generating " . $appname . "-" . $packageinfo["app_ver"] . "-linux.tar.gz...\n";
chdir($rootpath);
@unlink($appname . "-" . $packageinfo["app_ver"] . "-linux.tar.gz");
system("tar czvf " . escapeshellarg($appname . "-" . $packageinfo["app_ver"] . "-linux.tar.gz") . " --owner=0 --group=0 " . escapeshellarg($appname . "-" . $packageinfo["app_ver"] . "/"));
system("tar czvf " . escapeshellarg($appname . "-" . $packageinfo["app_ver"] . "-linux.tar.gz") . ($mac ? " " : " --owner=0 --group=0 ") . escapeshellarg($appname . "-" . $packageinfo["app_ver"] . "/"));

echo "Cleaning up...\n";
DirHelper::Delete($stagingpath);
Expand Down
3 changes: 2 additions & 1 deletion installers/osx-tar-gz/package.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// Determine the OS.
$os = php_uname("s");
$windows = (strtoupper(substr($os, 0, 3)) == "WIN");
$mac = (strtoupper(substr($os, 0, 6)) == "DARWIN");

if ($windows) echo "This script might not work as expected on Windows. Running this script via a reasonable Bash port (e.g. git bash) is recommended for tar/gzip support.\n\n";

Expand Down Expand Up @@ -164,7 +165,7 @@
echo "Generating " . $appname . "-" . $packageinfo["app_ver"] . "-osx.tar.gz...\n";
chdir($rootpath);
@unlink($appname . "-" . $packageinfo["app_ver"] . "-osx.tar.gz");
system("tar czvf " . escapeshellarg($appname . "-" . $packageinfo["app_ver"] . "-osx.tar.gz") . " --owner=0 --group=0 " . escapeshellarg($packageinfo["app_name"] . " " . $packageinfo["app_ver"] . " Installer.app/"));
system("tar czvf " . escapeshellarg($appname . "-" . $packageinfo["app_ver"] . "-osx.tar.gz") . ($mac ? " " : " --owner=0 --group=0 ") . escapeshellarg($packageinfo["app_name"] . " " . $packageinfo["app_ver"] . " Installer.app/"));

echo "Cleaning up...\n";
DirHelper::Delete($stagingpath);
Expand Down

0 comments on commit 83175e3

Please sign in to comment.