git.cweiske.de
/
shpub.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add --dry-run option for getting curl commands
[shpub.git]
/
src
/
shpub
/
Config.php
diff --git
a/src/shpub/Config.php
b/src/shpub/Config.php
index d41e45dc2a3495179fb797eb185d471a0b8e015f..f3ca5433d13a94904a6aeeae0148bafb28b9baf0 100644
(file)
--- a/
src/shpub/Config.php
+++ b/
src/shpub/Config.php
@@
-12,6
+12,10
@@
class Config
*/
public $host;
*/
public $host;
+ public $debug = false;
+
+ public $dryRun = false;
+
protected function getConfigFilePath()
{
if (!isset($_SERVER['HOME'])) {
protected function getConfigFilePath()
{
if (!isset($_SERVER['HOME'])) {
@@
-86,10
+90,10
@@
class Config
}
foreach ($this->hosts as $key => $host) {
if ($host->default) {
}
foreach ($this->hosts as $key => $host) {
if ($host->default) {
- return $
host
;
+ return $
key
;
}
}
}
}
-
+
reset($this->hosts);
return key($this->hosts);
}
reset($this->hosts);
return key($this->hosts);
}
@@
-114,5
+118,15
@@
class Config
}
return '"' . $val . '"';
}
}
return '"' . $val . '"';
}
+
+ public function setDebug($debug)
+ {
+ $this->debug = $debug;
+ }
+
+ public function setDryRun($dryRun)
+ {
+ $this->dryRun = $dryRun;
+ }
}
?>
}
?>