Changeset View
Changeset View
Standalone View
Standalone View
scripts/ssh/ssh-connect.php
| #!/usr/bin/env php | #!/usr/bin/env php | ||||
| <?php | <?php | ||||
| // This is a wrapper script for Git, Mercurial, and Subversion. It primarily | // This is a wrapper script for Git, Mercurial, and Subversion. It primarily | ||||
| // serves to inject "-o StrictHostKeyChecking=no" into the SSH arguments. | // serves to inject "-o StrictHostKeyChecking=no" into the SSH arguments. | ||||
| // In some cases, Subversion sends us SIGTERM. If we don't catch the signal and | // In some cases, Subversion sends us SIGTERM. If we don't catch the signal and | ||||
| // react to it, we won't run object destructors by default and thus won't clean | // react to it, we won't run object destructors by default and thus won't clean | ||||
| // up temporary files. Declare ticks so we can install a signal handler. | // up temporary files. Declare ticks so we can install a signal handler. | ||||
| if (function_exists('pcntl_async_signals')) { | |||||
| pcntl_async_signals(true); | |||||
| } else { | |||||
| declare(ticks=1); | declare(ticks = 1); | ||||
| } | |||||
| $root = dirname(dirname(dirname(__FILE__))); | $root = dirname(dirname(dirname(__FILE__))); | ||||
| require_once $root.'/scripts/__init_script__.php'; | require_once $root.'/scripts/__init_script__.php'; | ||||
| // Contrary to the documentation, Git may pass a "-p" flag. If it does, respect | // Contrary to the documentation, Git may pass a "-p" flag. If it does, respect | ||||
| // it and move it before the "--" argument. | // it and move it before the "--" argument. | ||||
| $args = new PhutilArgumentParser($argv); | $args = new PhutilArgumentParser($argv); | ||||
| $args->parsePartial( | $args->parsePartial( | ||||
| ▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines | |||||