po-toTransifex.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # Midnight Commander - push doc/hints/mc.hint file to Transifex
  3. #
  4. # Copyright (C) 2013
  5. # The Free Software Foundation, Inc.
  6. #
  7. # Written by:
  8. # Slava Zanko <slavazanko@gmail.com>, 2013
  9. #
  10. # This file is part of the Midnight Commander.
  11. #
  12. # The Midnight Commander is free software: you can redistribute it
  13. # and/or modify it under the terms of the GNU General Public License as
  14. # published by the Free Software Foundation, either version 3 of the License,
  15. # or (at your option) any later version.
  16. #
  17. # The Midnight Commander is distributed in the hope that it will be useful,
  18. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. # GNU General Public License for more details.
  21. #
  22. # You should have received a copy of the GNU General Public License
  23. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  24. set -e
  25. MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(dirname $(pwd))))}
  26. #*** include section (source functions, for example) *******************
  27. source "${MC_SOURCE_ROOT_DIR}/maint/utils/sync-transifex/functions"
  28. #*** file scope functions **********************************************
  29. copyPotToWorkDir() {
  30. work_dir=$1; shift
  31. source_dir=$1; shift
  32. cp -f "${source_dir}/mc.pot" "${work_dir}"
  33. }
  34. #*** main code *********************************************************
  35. WORK_DIR=$(initSyncDirIfNeeded "po")
  36. copyPotToWorkDir "${WORK_DIR}" "${MC_SOURCE_ROOT_DIR}/po"
  37. sendSourceToTransifex "${WORK_DIR}"