|
|
|
|
@ -31,18 +31,26 @@ if ($os_like == 'debian') { |
|
|
|
|
|
|
|
|
|
require 'OS/neato_' . ucfirst($os['id']) . '.php'; |
|
|
|
|
|
|
|
|
|
function clean_file_name(string & $file) { |
|
|
|
|
$file = str_replace("deploy_", "", $file); |
|
|
|
|
$file = str_replace(".php", "", $file); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$auto = (in_array('-y', $argv)) ? true : false; |
|
|
|
|
$mark = (in_array('-marksafe', $argv)) ? true : false; |
|
|
|
|
$skipdeploy = (in_array('-skipdeploy', $argv)) ? true : false; |
|
|
|
|
$file = $argv[1]; |
|
|
|
|
clean_file_name($file); |
|
|
|
|
|
|
|
|
|
if (is_string_found($argv[1], 'http://') || is_string_found($argv[1], 'https://')) { |
|
|
|
|
if ( isset($argv[2]) && $argv[2] !== "-y" ) { |
|
|
|
|
$file = $argv[2]; |
|
|
|
|
clean_file_name($file); |
|
|
|
|
} else { |
|
|
|
|
$pos = strrpos($argv[1], '/'); |
|
|
|
|
$file = substr($argv[1], $pos + 1); |
|
|
|
|
$file = str_replace(".txt", "", $file); |
|
|
|
|
clean_file_name($file); |
|
|
|
|
} |
|
|
|
|
\utils\curl::save($argv[1], "deploy_{$file}.php"); |
|
|
|
|
} |
|
|
|
|
|