vendor.sh 832 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. run_vendor()
  3. {
  4. local LOCALDIR="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
  5. local TARGET="${LOCALDIR%/*}" # deleted slash
  6. local BASE="${TARGET%scripts}" # input
  7. if [[ -d "$BASE"/local.env/hashover-next/ ]];
  8. then
  9. rm -rf "$BASE"/output/hashover-next/
  10. echo "$BASE"/output/ | xargs -n 1 cp -rf "$BASE"/local.env/hashover-next/
  11. else
  12. echo 'Not hashover'
  13. fi
  14. if [[ -f "$BASE"/local.env/.htaccess ]];
  15. then
  16. rm -rf "$BASE"/output/.htaccess
  17. cp -rf "$BASE"/local.env/.htaccess "$BASE"/output/
  18. else
  19. echo 'Not exits .htaccess'
  20. fi
  21. }
  22. # ==============================================================================
  23. # EXECUTION - START
  24. # ==============================================================================
  25. run_vendor "$@"