mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-22 08:12:29 +01:00
"~" in if..then..fi fix for BASH console
This commit is contained in:
parent
88c2110365
commit
f15526b30a
@ -34,7 +34,7 @@ task('deploy:prepare', function () {
|
||||
$basePath = config()->getPath();
|
||||
|
||||
// Check if base path exist.
|
||||
run("if [ ! -d \"$basePath\" ]; then mkdir $basePath; fi", true);
|
||||
run("if [ ! -d $(echo $basePath) ]; then mkdir $basePath; fi", true);
|
||||
|
||||
// Create releases dir.
|
||||
run("if [ ! -d \"releases\" ]; then mkdir releases; fi");
|
||||
@ -96,7 +96,7 @@ task('deploy:shared', function () {
|
||||
|
||||
foreach ($sharedDirs as $dir) {
|
||||
// Remove dir from source
|
||||
run("if [ -d \"$releasePath/$dir\" ]; then rm -rf $releasePath/$dir; fi");
|
||||
run("if [ -d $(echo $releasePath/$dir) ]; then rm -rf $releasePath/$dir; fi");
|
||||
|
||||
// Create shared dir if does not exist
|
||||
run("mkdir -p $sharedPath/$dir");
|
||||
@ -198,4 +198,4 @@ task('cleanup', function () {
|
||||
task('deploy:start', function () {
|
||||
});
|
||||
task('deploy:end', function () {
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user