Line 0
Link Here
|
0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
use File::Basename; |
3 |
use IPC::Cmd qw( run ); |
4 |
|
5 |
my $dir = dirname $0; |
6 |
my ( $cmd, $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ); |
7 |
|
8 |
$cmd = "sudo koha-shell kohadev -c 'perl $dir/populate_db.pl --with-records -v'"; |
9 |
( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run( command => $cmd, verbose => 1 ); |
10 |
exit(1) unless $success; |
11 |
$cmd = "sudo koha-shell kohadev -c 'perl $dir/create_superlibrarian.pl'"; |
12 |
( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run( command => $cmd, verbose => 1 ); |
13 |
exit(1) unless $success; |
14 |
$cmd = "sudo koha-rebuild-zebra -f -v kohadev"; |
15 |
( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run( command => $cmd, verbose => 1 ); |
16 |
exit(1) unless $success; |
17 |
|
18 |
exit(0); |