Skip to content

Commit 809ab4c

Browse files
committed
Improve install.php
[ci skip]
1 parent bfb82e7 commit 809ab4c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

install.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@ public static function install()
2020
@mkdir('tmp', 0755);
2121
@mkdir('tmp/log', 0755);
2222

23-
copy('vendor/kenjis/codeigniter-cli/cli', 'cli');
24-
copy('vendor/kenjis/codeigniter-cli/ci_instance.php', 'ci_instance.php');
23+
static::copy('vendor/kenjis/codeigniter-cli/cli', 'cli');
24+
static::copy('vendor/kenjis/codeigniter-cli/ci_instance.php', 'ci_instance.php');
2525

2626
chmod('cli', 0755);
2727
}
2828

29+
private static function copy($src, $dst)
30+
{
31+
$success = copy($src, $dst);
32+
if ($success) {
33+
echo 'copied: ' . $dst . PHP_EOL;
34+
}
35+
}
36+
2937
/**
3038
* Recursive Copy
3139
*

0 commit comments

Comments
 (0)