#!/usr/bin/env php safeLoad(); // Setup our CLI $app = new App(); $app->setSignature('./run'); $app->registerCommand('backup', [new BackupCommand($bsDir), 'handle']); $app->registerCommand('init', [new InitCommand(), 'handle']); try { $app->runCommand($argv); } catch (Exception $error) { fwrite(STDERR, "An error occurred when attempting to run a command:\n"); fwrite(STDERR, $error->getMessage() . "\n"); exit(1); }