diff --git a/README.md b/README.md index 31358ec..58ed6eb 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,9 @@ $ rm install_neato.sh ``` $ sudo -i $ cd /opt/neatoDemployments -$./make-sums.sh +$ ./make-sums.sh +# if done as ROOT type $ exit +# to exit! ``` ## Do Deployments... ``` diff --git a/app/neato.php b/app/neato.php index 95f4969..7d2d568 100644 --- a/app/neato.php +++ b/app/neato.php @@ -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"); }