icons.sh 631 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # copy icons
  3. #
  4. run_images()
  5. {
  6. local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
  7. local _target="${_dir%/*}" # deleted slash
  8. local _src="${_target%scripts}/src/images/" # input
  9. local _dest="${_target%scripts}/dist/" # output
  10. # copy images
  11. if [[ -n "${_src}" ]];
  12. then
  13. rm -rfv "${_dest}/images/"
  14. mkdir -p "${_dest}"
  15. cp -rfv "${_src}" "${_dest}"
  16. fi
  17. }
  18. # ==============================================================================
  19. # EXECUTION - START
  20. # ==============================================================================
  21. run_images "$@"