Use current directory if no arguments provided

This commit is contained in:
Miraty 2021-10-26 19:55:25 +02:00
parent fad5d68917
commit 450299e95a

View file

@ -9,7 +9,12 @@ define("FIND", "/usr/bin/find");
define("GZIP", "/usr/bin/gzip"); define("GZIP", "/usr/bin/gzip");
define("ROOT", dirname($_SERVER['SCRIPT_FILENAME'])); define("ROOT", dirname($_SERVER['SCRIPT_FILENAME']));
define("SITE", $argv[1]);
if (isset($argv[1]))
define("SITE", $argv[1]);
else
define("SITE", getcwd());
if (isset($argv[2])) if (isset($argv[2]))
define("DESTINATION", $argv[2]); define("DESTINATION", $argv[2]);
else else