Install.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. namespace App\Console\Commands;
  3. use Illuminate\Console\Command;
  4. class Install extends Command
  5. {
  6. /**
  7. * The name and signature of the console command.
  8. *
  9. * @var string
  10. */
  11. protected $signature = 'install {--test}';
  12. /**
  13. * The console command description.
  14. *
  15. * @var string
  16. */
  17. protected $description = 'install new host';
  18. /**
  19. * Create a new command instance.
  20. *
  21. * @return void
  22. */
  23. public function __construct()
  24. {
  25. parent::__construct();
  26. }
  27. /**
  28. * Execute the console command.
  29. *
  30. * @return int
  31. */
  32. /*
  33. php ../../public/app/install/db_insert_templet_cli.php 1 217
  34. php ../../public/app/install/db_update_toc_cli.php 1 217 pali
  35. php ../../public/app/install/db_update_toc_cli.php 1 217 zh-hans
  36. php ../../public/app/install/db_update_toc_cli.php 1 217 zh-hant
  37. php ../../public/app/install/db_insert_palitext_cli.php 1 217
  38. php ../../public/app/install/db_update_palitext_cli.php 1 217
  39. php ../../public/app/install/db_insert_bookword_from_csv_cli.php 1 217
  40. php ../../public/app/install/db_insert_word_from_csv_cli.php 1 217
  41. php ../../public/app/install/db_insert_wordindex_from_csv_cli.php
  42. php ./migrations/20211202084900_init_pali_serieses.php
  43. php ./migrations/20211125155600_word_statistics.php
  44. php ./migrations/20211125155700_pali_sent_org.php
  45. php ./migrations/20211125165700-pali_sent-upgrade.php
  46. php ./migrations/20211126220400-pali_sent_index-upgrade.php
  47. php ./migrations/20211127214800_sent_sim.php
  48. php ./migrations/20211127214900-sent_sim_index.php
  49. php ../../public/app/fts/sql.php
  50. php ../../public/app/admin/word_index_weight_refresh.php 1 217
  51. */
  52. public function handle()
  53. {
  54. $isTest = $this->option('test');
  55. if($isTest){
  56. $this->call('install:wbwtemplate', ['from' => 1]);
  57. }else{
  58. $this->call('install:wbwtemplate');
  59. $this->call('install:palitext');
  60. $this->call('install:wordbook');
  61. $this->call('install:wordall');
  62. $this->call('install:wordindex');
  63. $this->call('upgrade:palitext');
  64. $this->call('upgrade:palitoc',['lang'=>'pali']);
  65. $this->call('upgrade:palitoc',['lang'=>'zh-hans']);
  66. $this->call('upgrade:palitoc',['lang'=>'zh-hant']);
  67. $this->call('install:paliseries');
  68. $this->call('install:wordstatistics');
  69. }
  70. return 0;
  71. }
  72. }