icons.sh 685 B

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