allow full filename to be used by deployment...

main
Robert 2 years ago
parent 073f135b5e
commit 8e13d033e2
  1. 2
      README.md
  2. 8
      app/neato.php

@ -18,6 +18,8 @@ $ rm install_neato.sh
$ sudo -i
$ cd /opt/neatoDemployments
$ ./make-sums.sh
# if done as ROOT type $ exit
# to exit!
```
## Do Deployments...
```

@ -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");
}

Loading…
Cancel
Save