daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Sep 25th, 2016 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash
  2.  
  3.  
  4. echo 'Installing baner platform project...'
  5. echo '------------------------------------'
  6.  
  7. read  -p $'\e[1;32m
  8. Enter database name: \e[0m ' dbname
  9. read  -p $'\e[1;32m
  10. Enter database user name: \e[0m ' dbusername
  11. read  -p $'\e[1;32m
  12. Enter database password: \e[0m ' dbpass
  13. read  -p $'\e[1;32m
  14. Enter base domain(start from ., like .baner.local): \e[0m ' domain
  15.  
  16.  
  17. composer >/dev/null 2>&1 || { echo >&2 "You need to install composer first!"; exit 1; }
  18.  
  19. mkdir baner_platform
  20. cd baner_platform
  21.  
  22. echo 'Cloning repositories.'
  23. echo '------------------------------------'
  24.  
  25. git clone git@bitbucket.org:baner_platform/core.git
  26. git clone git@bitbucket.org:baner_platform/configs.git
  27. git clone git@bitbucket.org:baner_platform/homepage.git
  28. git clone git@bitbucket.org:baner_platform/admin.git
  29. git clone git@bitbucket.org:baner_platform/job.git
  30. git clone git@bitbucket.org:baner_platform/area.api.git area
  31. git clone git@bitbucket.org:baner_platform/ads.git
  32. git clone git@bitbucket.org:baner_platform/auto.git
  33.  
  34. echo 'Installing composer parallel install plugin for speed.'
  35. echo '------------------------------------'
  36. composer global require "hirak/prestissimo"
  37.  
  38.  
  39. echo 'Installing decencies.'
  40. echo '------------------------------------'
  41.  
  42. cd core
  43. composer install
  44.  
  45. cd ../homepage
  46. composer install
  47. npm install
  48.  
  49. cd ../admin
  50. composer install
  51.  
  52. cd ../job
  53. composer install
  54.  
  55. cd ../area
  56. composer install
  57.  
  58. cd ../auto
  59. composer install
  60.  
  61. cd ../ads
  62. composer install
  63. cd ../
  64.  
  65. echo 'Copy config.'
  66. echo '------------------------------------'
  67.  
  68. cp configs/.env.example .env
  69. sed -i -e 's/'DB_DATABASE=baner_platform'/'DB_DATABASE="$dbname"'/g' .env
  70. sed -i -e 's/'DB_USERNAME=root'/'DB_USERNAME="$dbusername"'/g' .env
  71. sed -i -e 's/'DB_PASSWORD=root'/'DB_PASSWORD="$dbpass"'/g' .env
  72. sed -i -e 's/'SESSION_DOMAIN=.baner-platform.local'/'SESSION_DOMAIN="$domain"'/g' .env
  73.  
  74. cp .env homepage/
  75. cp .env admin/
  76. cp .env job/
  77. cp .env ads/
  78. cp .env area/
  79. cp .env auto/
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top