From a233200cce9d02c4dfe066cb6e02e36cc97c22ba Mon Sep 17 00:00:00 2001 From: Ace Sobremont Date: Mon, 4 Sep 2023 13:43:33 +0800 Subject: [PATCH] pharynx replacement --- tools/build.php | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 tools/build.php diff --git a/tools/build.php b/tools/build.php deleted file mode 100644 index 8109bb4..0000000 --- a/tools/build.php +++ /dev/null @@ -1,49 +0,0 @@ -buildFromDirectory($to); - -if (COMPRESS_FILES) $phar->compressFiles(COMPRESSION); - -removeDirectory($to); - -print("Succeed! Output path: $outputPath"); - -function copyDirectory(string $from, string $to) : void{ - @mkdir($to, 0777, true); - $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($from, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST); - foreach($files as $fileInfo){ - $target = str_replace($from, $to, $fileInfo->getPathname()); - if($fileInfo->isDir()) @mkdir($target, 0777, true); - else{ - $contents = file_get_contents($fileInfo->getPathname()); - file_put_contents($target, $contents); - } - } -} - -function removeDirectory(string $dir) : void{ - $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST); - foreach($files as $fileInfo){ - if($fileInfo->isDir()) rmdir($fileInfo->getPathname()); - else unlink($fileInfo->getPathname()); - } - rmdir($dir); -} \ No newline at end of file