Skip to content

Instantly share code, notes, and snippets.

@spelcaster
Created September 3, 2017 03:27
Show Gist options
  • Save spelcaster/53d9044fdf62399a8509646738264241 to your computer and use it in GitHub Desktop.
Save spelcaster/53d9044fdf62399a8509646738264241 to your computer and use it in GitHub Desktop.
This script is used to copy locale files from app source directory to public directory.
#!/bin/bash
SRC_DIR=${1}
LOCALES_DIR=${2}
echo "Installing locales"
echo
while IFS= read -r -d $'\0' localeDir <&3; do
echo "Installing locales from '${localeDir}'..."
cp -rfv ${localeDir}/* ${LOCALES_DIR}
echo "[${?}] Successfully installed locales from '${localeDir}'"
echo
done 3< <(find ${SRC_DIR} -iname "*locales" -type d -print0)
echo "Finished..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment